from otree.api import * class C(BaseConstants): NAME_IN_URL = 'explora' PLAYERS_PER_GROUP = None NUM_ROUNDS = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): language = models.BooleanField( doc="""language""", widget=widgets.RadioSelect, choices=( (True, 'Français'), (False, 'Deutsch'), ) ) choiceAB = models.BooleanField() choiceCD = models.BooleanField() choice1 = models.BooleanField( doc="""choice""", widget=widgets.RadioSelect, choices=( (True, 'Yes'), (False, 'No'), ) ) choice2 = models.BooleanField( doc="""choice""", widget=widgets.RadioSelect, choices=( (True, 'Yes'), (False, 'No'), ) ) # FUNCTIONS # PAGES class LanguageChoice(Page): form_model = 'player' form_fields = ['language'] class Choice_Intro(Page): pass class Allias_Paradox(Page): form_model = 'player' form_fields = ['choiceAB', 'choiceCD'] class Question2_1(Page): form_model = 'player' form_fields = ['choice1'] class Question2_2(Page): form_model = 'player' form_fields = ['choice2'] class Results(Page): pass page_sequence = [LanguageChoice, Choice_Intro, Allias_Paradox, Question2_1, Question2_2, Results]