from otree.api import * c = cu doc = '' class C(BaseConstants): NAME_IN_URL = 'Instructions_D_V' PLAYERS_PER_GROUP = None NUM_ROUNDS = 1 TEMP_TEMPLATE = 'Instructions_D_V/temp.html' CC_TEMPLATE = 'Instructions_D_V/cc.html' CC2_TEMPLATE = 'Instructions_D_V/cc2.html' B_2_TEMPLATE = 'Instructions_D_V/b_2.html' O_5_TEMPLATE = 'Instructions_D_V/o_5.html' PROCEDURES_TEMPLATE = 'Instructions_D_V/procedures.html' BEFORE_EXP_TEMPLATE = 'Instructions_D_V/before_exp.html' class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): CC13 = models.IntegerField(choices=[[1, 'TRUE'], [0, 'FALSE']], label='Before deciding how much to bid on each asset in each round, Buyers will view each Owner’s prediction of their asset’s value. [TRUE or FALSE]', widget=widgets.RadioSelect) CCD1 = models.IntegerField(choices=[[1, 'TRUE'], [0, 'FALSE']], label='Before deciding how much to bid on each asset, Buyers will view summary information (based on all rounds) about the percentage of times that each Owner’s predictions were overstated, accurate, and understated. [TRUE or FALSE]', widget=widgets.RadioSelect) CC_6 = models.IntegerField(initial=0) CC13_2 = models.IntegerField(choices=[[1, 'TRUE'], [0, 'FALSE']], label='Before deciding how much to bid on each asset in each round, Buyers will view each Owner’s prediction of their asset’s value. [TRUE or FALSE]', widget=widgets.RadioSelect) CCD1_2 = models.IntegerField(choices=[[1, 'TRUE'], [0, 'FALSE']], label='Before deciding how much to bid on each asset, Buyers will view summary information (based on all rounds) about the percentage of times that each Owner’s predictions were overstated, accurate, and understated. [TRUE or FALSE]', widget=widgets.RadioSelect) CC14 = models.IntegerField(choices=[[1, 'TRUE'], [0, 'FALSE']], label='Regardless of how much Buyers bid on an Owner’s asset, Owners earn more points as the actual value of their asset increases. [TRUE or FALSE]', widget=widgets.RadioSelect) CC_7 = models.IntegerField(initial=0) CC14_2 = models.IntegerField(choices=[[1, 'TRUE'], [0, 'FALSE']], label='Regardless of how much Buyers bid on an Owner’s asset, Owners earn more points as the actual value of their asset increases. [TRUE or FALSE]', widget=widgets.RadioSelect) def CC_Check_6(player: Player): if player.CC13 != 1: player.CC_6 += 1 else: player.CC_6 += 0 if player.CCD1 != 1: player.CC_6 += 1 else: player.CC_6 += 0 def CC13_2_error_message(player: Player, value): if value != 1: return "INCORRECT! Please try again." def CCD1_2_error_message(player: Player, value): if value != 1: return "INCORRECT! Please try again." def CC_Check_7(player: Player): if player.CC14 != 1: player.CC_7 += 1 else: player.CC_7 += 0 def CC14_2_error_message(player: Player, value): if value != 1: return "INCORRECT! Please try again." class B_Info(Page): form_model = 'player' class B_Info_Check(Page): form_model = 'player' form_fields = ['CC13', 'CCD1'] @staticmethod def before_next_page(player: Player, timeout_happened): CC_Check_6(player) class B_Info_Check_13(Page): form_model = 'player' form_fields = ['CC13_2'] @staticmethod def is_displayed(player: Player): return player.CC13 != 1 class B_Info_Check_D1(Page): form_model = 'player' form_fields = ['CCD1_2'] @staticmethod def is_displayed(player: Player): return player.CCD1 != 1 class O_Pay(Page): form_model = 'player' class O_Pay_Check(Page): form_model = 'player' form_fields = ['CC14'] @staticmethod def before_next_page(player: Player, timeout_happened): CC_Check_7(player) class O_Pay_Check_14(Page): form_model = 'player' form_fields = ['CC14_2'] @staticmethod def is_displayed(player: Player): return player.CC14 != 1 class Procedure(Page): form_model = 'player' class BeforeExp(Page): form_model = 'player' page_sequence = [B_Info, B_Info_Check, B_Info_Check_13, B_Info_Check_D1, O_Pay, O_Pay_Check, O_Pay_Check_14, Procedure, BeforeExp]