from otree.api import * doc = """ Your app description """ class C(BaseConstants): NAME_IN_URL = 'instructions2_agents_nounder' PLAYERS_PER_GROUP = None NUM_ROUNDS = 1 SEPARATE_POT = cu(1.75) class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): c_question1 = models.IntegerField( choices=[[1, 'perform additions'], [2, 'solve puzzles'], [3, 'recite poetry'], [4, 'transcribe Greek letters']], label='You will __________ in each round.', widget=widgets.RadioSelect, ) c_question2 = models.IntegerField( choices=[[1, 'be more likely to get a high payment'], [2, 'be sure to get a high payment'], [3, 'not be affected by your performance']], label='If you have more correct answers in a round, your paired Decider will...', widget=widgets.RadioSelect, ) c_question3 = models.IntegerField( choices=[[1, '$2'], [2, '$1'], [3, '$1.5'], [4, '$1.75']], label='Suppose your Decider gets a high payment of $2. What is the most he/she can pay you?', widget=widgets.RadioSelect, ) c_question4 = models.IntegerField( choices=[[1, 'Yes'], [2, 'No'], [3, 'It depends']], label='If you answer all questions correctly, will your Decider get the high payment for sure?', widget=widgets.RadioSelect, ) # PAGES class Instructions_task1(Page): @staticmethod def vars_for_template(player: Player): return dict( separate_pot=C.SEPARATE_POT, ) class Paymentrule(Page): @staticmethod def vars_for_template(player: Player): return dict( separate_pot=C.SEPARATE_POT, ) class Instructions_beliefs(Page): pass class SomeUnderstandingQuestions(Page): form_model = 'player' form_fields= ['c_question1', 'c_question2', 'c_question3', 'c_question4'] @staticmethod def error_message(player, values): print('values is', values) if values["c_question1"] != 2 or values["c_question2"] != 1 or values["c_question3"] != 4 or values["c_question4"] != 2: return 'There is at least one incorrect answer. Please, reconsider.' page_sequence = [Instructions_task1, Paymentrule,]