from otree.api import * c = Currency doc = """ Your app description """ class C(BaseConstants): NAME_IN_URL = 'instructions' PLAYERS_PER_GROUP = None NUM_ROUNDS = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): Choice_1 = models.IntegerField( choices=[[1, "20"], [2, "31"], [3, "11"], [4, "0"]], widget=widgets.RadioSelect, label="The answer is:" ) Choice_2 = models.IntegerField( choices=[[1, "Only Ann will accept Job 1."], [2, "Only Ann will accept Job 2."], [3, "Only Bob will accept Job 1."], [4, "Only Bob will accept Job 2."]], widget=widgets.RadioSelect, label="" ) wb_1 = models.FloatField( label="Your wage choice for Job 2 is:", max=90 ) Choice_31 = models.IntegerField( label="If the worker was Ann" ) Choice_32 = models.IntegerField( label="If the worker was Bob" ) Choice_33 = models.IntegerField( label="If both want a job and Ann was chosen" ) Choice_34 = models.IntegerField( label="If both want a job and Bob was chosen" ) # PAGES class Comp1(Page): form_model = "player" form_fields = ["Choice_1"] class Comp2(Page): def vars_for_template(player): return dict( correct=player.Choice_1 == 1 ) class Comp3(Page): form_model = "player" form_fields = ["Choice_2"] class Comp4(Page): def vars_for_template(player): return dict( correct=player.Choice_2 == 2 ) class Comp5(Page): form_model = "player" form_fields = ["Choice_31", "Choice_32", "Choice_33", "Choice_34"] class Comp6(Page): def vars_for_template(player): return dict( correct=(player.Choice_31 == 32) & (player.Choice_32 == 14) & (player.Choice_33 == 32) & ( player.Choice_34 == 14) ) class Inst1(Page): pass class Inst2(Page): pass class Inst3(Page): pass class exmple1(Page): pass class exmple2(Page): pass class EndInst(Page): pass # page_sequence = [Inst1, Inst2, Inst3, Inst4] page_sequence = [Inst1, Inst2, Inst3, Comp1, Comp2, Comp3, Comp4, EndInst]