from otree.api import * class C(BaseConstants): NAME_IN_URL = 'survey_2' PLAYERS_PER_GROUP = None NUM_ROUNDS = 1 INSTRUCTIONS = 'survey_2/Welcome.html' class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): name = models.StringField( label="Comment t'appelles-tu ?" ) place = models.StringField( label="Où est-ce que se situe ton camp ?" ) best_friend = models.StringField( label=''' Qui est ton/ta meilleur.e ami.e (nom et prénom) dans les personnes présentes au camp cet été ?''' ) friend1 = models.StringField( label=''' ''' ) hint_friend1 = models.StringField( label='''Chapeau''' ) hint_friend2 = models.StringField( label="Chemise" ) hint_friend3 = models.StringField( label="Pull" ) hint_friend4 = models.StringField( label="Manteau" ) color_hat = models.IntegerField( label="Quelle est la couleur de la casquette du chien ?", choices=[ [1, "Rouge"], [2, "Orange"], [3, "Vert"], [4, "Bleu"], [5, "Violet"], [6, "Rose"], [7, "Jaune"], [8, "Je ne sais pas"] ] ) color_shirt = models.IntegerField( label="Quelle est la couleur de la chemise du chien ?", choices=[ [1, "Rouge"], [2, "Orange"], [3, "Vert"], [4, "Bleu"], [5, "Violet"], [6, "Rose"], [7, "Jaune"], [8, "Je ne sais pas"] ] ) color_pull = models.IntegerField( label="Quelle est la couleur du pull du chien ?", choices=[ [1, "Rouge"], [2, "Orange"], [3, "Vert"], [4, "Bleu"], [5, "Violet"], [6, "Rose"], [7, "Jaune"], [8, "Je ne sais pas"] ] ) color_jacket = models.IntegerField( label="Quelle est la couleur du manteau du chien ?", choices=[ [1, "Rouge"], [2, "Orange"], [3, "Vert"], [4, "Bleu"], [5, "Violet"], [6, "Rose"], [7, "Jaune"], [8, "Je ne sais pas"] ] ) attention_check = models.IntegerField( label="Jai bien regardé la photo ci-dessus", choices=[ [1, "Oui"], [2, "Non"], ] ) # FUNCTIONS # PAGES class introduction_welcome(Page): form_model = 'player' class Demographics(Page): form_model = 'player' form_fields = ['name', 'place'] class Best_Friend(Page): form_model = 'player' form_fields = ['best_friend'] class List_Friends(Page): form_model = 'player' form_fields = ['friend1'] class Puppy(Page): form_model = 'player' form_fields = ['color_hat', 'color_shirt', 'color_pull', 'color_jacket'] class Help_Puppy(Page): form_model = 'player' form_fields = ['hint_friend1', 'hint_friend2', 'hint_friend3', 'hint_friend4'] class Last_Page(Page): form_model = 'player' page_sequence = [introduction_welcome, Demographics, Best_Friend, List_Friends, Puppy, Help_Puppy,Last_Page]