from otree.api import * c = cu doc = '' class C(BaseConstants): NAME_IN_URL = 'Intro_Unin_Unsa' PLAYERS_PER_GROUP = None NUM_ROUNDS = 1 SHOW_UP_FEE = 5 BEGINNING_ASSET_VALUE = 150 TEMPLATE_TEMPLATE = 'Intro_Unin_Unsa/template.html' CC_TEMPLATE = 'Intro_Unin_Unsa/cc.html' CC_SHORT_TEMPLATE = 'Intro_Unin_Unsa/cc_short.html' INTRO_EXPERIMENT_TEMPLATE = 'Intro_Unin_Unsa/intro_experiment.html' OVERVIEW_EXPERIMENT_TEMPLATE = 'Intro_Unin_Unsa/overview_experiment.html' CC_SECOND_ATTEMPT_TEMPLATE = 'Intro_Unin_Unsa/cc_second_attempt.html' INTRO_ASSET_TEMPLATE = 'Intro_Unin_Unsa/intro_asset.html' OWNER_TEMPLATE = 'Intro_Unin_Unsa/owner.html' OWNER_2_TEMPLATE = 'Intro_Unin_Unsa/owner_2.html' BUYER_TEMPLATE = 'Intro_Unin_Unsa/buyer.html' OWERN_POINT_TEMPLATE = 'Intro_Unin_Unsa/owern_point.html' PROCEDURES_TEMPLATE = 'Intro_Unin_Unsa/procedures.html' PRE_PRACTICE_TEMPLATE = 'Intro_Unin_Unsa/pre_practice.html' CC_2_TEMPLATE = 'Intro_Unin_Unsa/cc_2.html' CC_SECOND_ATTEMPT_2_TEMPLATE = 'Intro_Unin_Unsa/cc_second_attempt_2.html' class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): CC_1 = models.IntegerField(label='What is the starting value of an asset? [IN POINTS]', min=0) CC_2 = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='[TRUE or FALSE] Each Owner makes a choice that will influence how much the value of his/her asset will increase or decrease from its starting value', widget=widgets.RadioSelect) CC_3 = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='[TRUE or FALSE] Each Owner makes a prediction about how much his/her asset’s value will increase or decrease', widget=widgets.RadioSelect) CC_4 = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='[TRUE or FALSE] Buyers view Owners’ predictions and then bid on the assets', widget=widgets.RadioSelect) Num_Wrong_CC = models.IntegerField(initial=0) CC_1_2 = models.IntegerField(label='What is the starting value of an asset? [IN POINTS]', min=0) CC_2_2 = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='[TRUE or FALSE] Each Owner makes a choice that will influence how much the value of his/her asset will increase or decrease from its starting value', widget=widgets.RadioSelect) CC_3_2 = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='[TRUE or FALSE] Each Owner makes a prediction about how much his/her asset’s value will increase or decrease', widget=widgets.RadioSelect) CC_4_2 = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='[TRUE or FALSE] Buyers view Owners’ predictions and then bid on the assets', widget=widgets.RadioSelect) CC_5 = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='[TRUE or FALSE] There are three different factors that influence how much the value of the asset will change from its initial value of 150 points', widget=widgets.RadioSelect) CC_6 = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='[TRUE or FALSE] The Random Factor is randomly determined and can be any value between -50 points and +50 points', widget=widgets.RadioSelect) CC_7 = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='[TRUE or FALSE] The Bonus Factor is always equal to either 0 points or 100 points. The Owner chooses the likelihood that the Bonus Factor equals 100 points', widget=widgets.RadioSelect) CC_8 = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='[TRUE or FALSE] The Cost Factor can be any amount between 0 points and 100 points. The Cost Factor is higher when Owners choose a higher likelihood that the Bonus Factor will be equal to 100 points', widget=widgets.RadioSelect) CC_9 = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='[TRUE or FALSE] Based on the Random, Bonus, and Cost Factors, the final value of the asset can be anything between 0 points and 300 points', widget=widgets.RadioSelect) Num_Wrong_CC_2 = models.IntegerField(initial=0) CC_5_2 = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='[TRUE or FALSE] There are three different factors that influence how much the value of the asset will change from its initial value of 150 points', widget=widgets.RadioSelect) CC_6_2 = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='[[TRUE or FALSE] The Random Factor is randomly determined and can be any value between -50 points and +50 points', widget=widgets.RadioSelect) CC_7_2 = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='[TRUE or FALSE] The Bonus Factor is always equal to either 0 points or 100 points. The Owner chooses the likelihood that the Bonus Factor equals 100 points', widget=widgets.RadioSelect) CC_8_2 = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='[TRUE or FALSE] The Cost Factor can be any amount between 0 points and 100 points. The Cost Factor is higher when Owners choose a higher likelihood that the Bonus Factor will be equal to 100 points', widget=widgets.RadioSelect) CC_9_2 = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='[TRUE or FALSE] Based on the Random, Bonus, and Cost Factors, the final value of the asset can be anything between 0 points and 300 points', widget=widgets.RadioSelect) CC_10 = models.IntegerField(choices=[[0, '0 points'], [1, '1 point'], [2, '4 points'], [3, '9 points'], [4, '16 points'], [5, '25 points'], [6, '36 points'], [7, '49 points'], [8, '64 points'], [9, '81 points'], [10, '100 points']], label='If the Owner chooses that the Bonus Factor will have a 30% likelihood of equaling 100 points, what is the Cost Factor? [Please select an answer]') CC_11 = models.IntegerField(choices=[[0, '0 points'], [1, '1 point'], [2, '4 points'], [3, '9 points'], [4, '16 points'], [5, '25 points'], [6, '36 points'], [7, '49 points'], [8, '64 points'], [9, '81 points'], [10, '100 points']], label='If the Owner chooses that the Bonus Factor will have a 70% likelihood of equaling 100 points, what is the Cost Factor? [Please select an answer]') CC_Extra = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='[TRUE or FALSE] An Owner’s choice of a higher likelihood of an asset having a Bonus Factor of 100 pints will require a higher Cost Factor', widget=widgets.RadioSelect) Num_Wrong_CC_3 = models.IntegerField(initial=0) CC_10_2 = models.IntegerField(choices=[[0, '0 points'], [1, '1 point'], [2, '4 points'], [3, '9 points'], [4, '16 points'], [5, '25 points'], [6, '36 points'], [7, '49 points'], [8, '64 points'], [9, '81 points'], [10, '100 points']], label='If the Owner chooses that the Bonus Factor will have a 30% likelihood of equaling 100 points, what is the Cost Factor? [Please select an answer]') CC_11_2 = models.IntegerField(choices=[[0, '0 points'], [1, '1 point'], [2, '4 points'], [3, '9 points'], [4, '16 points'], [5, '25 points'], [6, '36 points'], [7, '49 points'], [8, '64 points'], [9, '81 points'], [10, '100 points']], label='If the Owner chooses that the Bonus Factor will have a 70% likelihood of equaling 100 points, what is the Cost Factor? [Please select an answer]') CC_Extra_2 = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='[TRUE or FALSE] An Owner’s choice of a higher likelihood of an asset having a Bonus Factor of 100 points will require a higher Cost Factor', widget=widgets.RadioSelect) CC_12 = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='[TRUE or FALSE] When making their predictions about how much the asset’s value will change from its initial value of 150 points, Owners do not know the value of the Random Factor, only that the Random Factor can be anything between -50 points and +50 points', widget=widgets.RadioSelect) CC_13 = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='[TRUE or FALSE] When making their predictions, Owners know the likelihood of the Bonus Factor being 100 points', widget=widgets.RadioSelect) CC_14 = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='[TRUE or FALSE] When making their predictions, Owners know the Cost Factor', widget=widgets.RadioSelect) CC_15 = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='[TRUE or FALSE] Both Owners and Buyers will be given information about the accuracy of each Owner’s predictions in previous rounds. This accuracy information provides an indication of whether Owners’ past predictions have been reliable forecasts of how much the asset’s value actually changed and whether Owners’ typically overestimate or underestimate the actual change in value', widget=widgets.RadioSelect) Num_Wrong_CC_4 = models.IntegerField(initial=0) CC_12_2 = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='[TRUE or FALSE] When making their predictions about how much the asset’s value will change from its initial value of 150 points, Owners do not know the value of the Random Factor, only that the Random Factor can be anything between -50 points and +50 points', widget=widgets.RadioSelect) CC_13_2 = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='[TRUE or FALSE] When making their predictions, Owners know the likelihood of the Bonus Factor being 100 points', widget=widgets.RadioSelect) CC_14_2 = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='[TRUE or FALSE] When making their predictions, Owners know the Cost Factor', widget=widgets.RadioSelect) CC_15_2 = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='[TRUE or FALSE] Both Owners and Buyers will be given information about the accuracy of each Owner’s predictions in previous rounds. This accuracy information provides an indication of whether Owners’ past predictions have been reliable forecasts of how much the asset’s value actually changed and whether Owners’ typically overestimate or underestimate the actual change in value', widget=widgets.RadioSelect) CC_16 = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='[TRUE or FALSE] After viewing each Owner’s prediction about how much the asset’s value will increase or decrease, Buyers will bid on one share of each Owner’s asset', widget=widgets.RadioSelect) CC_17 = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='[TRUE or FALSE] Shares of the asset are worth 50% of the asset’s final value. Therefore, Buyers can always bid any amount between 0 points and 150 points', widget=widgets.RadioSelect) CC_18 = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='[TRUE or FALSE] The Buyer with the highest bid on each asset will earn points equal to the difference between the final value of the share (i.e., 50% of the asset’s final value) and the amount bid', widget=widgets.RadioSelect) CC_19_A = models.IntegerField(choices=[[1, 'Gain'], [2, 'Lose']], label='If the winning Buyer bids 115 points and the share ends up being worth 130 points (i.e., the final value of the asset is 260 points), will the Buyer gain or lose points', widget=widgets.RadioSelect) CC_19_B = models.IntegerField(label='If the winning Buyer bids 115 points and the share ends up being worth 130 points (i.e., the final value of the asset is 260 points), how many points will the Buyer gain or lose? Please input positive number for gain and negative number for loss [IN POINTS]') CC_20_A = models.IntegerField(choices=[[1, 'Gain'], [2, 'Lose']], label='If the winning Buyer bids 115 points and the share ends up being worth 100 points (i.e., the final value of the asset is 200 points), will the Buyer gain or lose points', widget=widgets.RadioSelect) CC_20_B = models.IntegerField(label='If the winning Buyer bids 115 points and the share ends up being worth 100 points (i.e., the final value of the asset is 200 points), how many points will the Buyer gain or lose? Please input positive number for gain and negative number for loss [IN POINTS]') CC_21 = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='[TRUE or FALSE] A single Buyer can have the highest bid for more than one of the three available shares in each round', widget=widgets.RadioSelect) Num_Wrong_CC_5 = models.IntegerField(initial=0) CC_16_2 = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='[TRUE or FALSE] After viewing each Owner’s prediction about how much the asset’s value will increase or decrease, Buyers will bid on one share of each Owner’s asset', widget=widgets.RadioSelect) CC_17_2 = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='[TRUE or FALSE] Shares of the asset are worth 50% of the asset’s final value. Therefore, Buyers can always bid any amount between 0 points and 150 points', widget=widgets.RadioSelect) CC_18_2 = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='[TRUE or FALSE] The Buyer with the highest bid on each asset will earn points equal to the difference between the final value of the share (i.e., 50% of the asset’s final value) and the amount bid', widget=widgets.RadioSelect) CC_19_A_2 = models.IntegerField(choices=[[1, 'Gain'], [2, 'Lose']], label='If the winning Buyer bids 115 points and the share ends up being worth 130 points (i.e., the final value of the asset is 260 points), will the Buyer gain or lose points', widget=widgets.RadioSelect) CC_19_B_2 = models.IntegerField(label='If the winning Buyer bids 115 points and the share ends up being worth 130 points (i.e., the final value of the asset is 260 points), how many points will the Buyer gain or lose? Please input positive number for gain and negative number for loss [IN POINTS]') CC_20_A_2 = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='If the winning Buyer bids 115 points and the share ends up being worth 100 points (i.e., the final value of the asset is 200 points), will the Buyer gain or lose points', widget=widgets.RadioSelect) CC_20_B_2 = models.IntegerField(label='If the winning Buyer bids 115 points and the share ends up being worth 100 points (i.e., the final value of the asset is 200 points), how many points will the Buyer gain or lose? Please input positive number for gain and negative number for loss [IN POINTS]') CC_21_2 = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='[TRUE or FALSE] A single Buyer can have the highest bid for more than one of the three available shares in each round', widget=widgets.RadioSelect) CC_22 = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='[TRUE or FALSE] Regardless of how much Buyers bid on assets, Owners earn more points as the assets’ final values increase', widget=widgets.RadioSelect) CC_23 = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='[TRUE or FALSE] If an Owner’s prediction is within 50 points (in either direction) of the actual change in the asset’s value, the Owner will receive 5 points', widget=widgets.RadioSelect) Num_Wrong_CC_6 = models.IntegerField(initial=0) CC_22_2 = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='[TRUE or FALSE] Regardless of how much Buyers bid on assets, Owners earn more points as the assets’ final values increase', widget=widgets.RadioSelect) CC_23_2 = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='[TRUE or FALSE] If an Owner’s prediction is within 50 points (in either direction) of the actual change in the asset’s value, the Owner will receive 5 points', widget=widgets.RadioSelect) CC_24 = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='[TRUE or FALSE] Owners perform two jobs: (1) make a choice that affects the asset’s final value, and (2) make a prediction about how much the asset’s final value will increase or decrease from its initial value of 150 points', widget=widgets.RadioSelect) CC_25 = models.IntegerField(label='Based on the Random, Bonus, and Cost Factors, the amount by which an asset’s value can increase or decrease ranges from +150 to -150 points. What is the minimum final value for an asset [IN POINTS]') CC_25_Max = models.IntegerField(label='Based on the Random, Bonus, and Cost Factors, the amount by which an asset’s value can increase or decrease ranges from +150 to -150 points. What is the maximum final value for an asset [IN POINTS]') CC_26 = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='[TRUE or FALSE] The experiment will consist of several rounds of a market with three Owners and three Buyers. Therefore, in each round there will be three assets for Buyers to bid on', widget=widgets.RadioSelect) CC_27 = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='[TRUE or FALSE] Buyers view each Owner’s prediction of their asset’s final value, then decide how much to bid to “win” one share of each asset', widget=widgets.RadioSelect) CC_28 = models.IntegerField(label="Because the asset's final value can range from 0 to 300 and shares of the asset are worth 50% of the asset's final value, what is the minimum bid a Buyer can place on each asset? [IN POINTS]", max=300, min=0) CC_28_Max = models.IntegerField(label="Because the asset's final value can range from 0 to 300 and shares of the asset are worth 50% of the asset's final value, what is the maximum bid a Buyer can place on each asset? [IN POINTS]", max=300, min=0) CC_29 = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='[TRUE or FALSE] The Buyer making the highest bid will earn points equal to 50% of the asset’s final value minus the amount bid', widget=widgets.RadioSelect) CC_30 = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='[TRUE or FALSE] Owners will earn points equal to 50% of their asset’s final value. Therefore, regardless of how much Buyers bid on the assets, Owners earn more points as the assets’ final values increase', widget=widgets.RadioSelect) CC_31 = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='[TRUE or FALSE] Owners will also receive 5 points if their prediction is within 50 points (in either direction) of the actual change in the asset’s value', widget=widgets.RadioSelect) CC_32 = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='[TRUE or FALSE] Owners and Buyers with the highest number of points at the end of the experiment will receive the highest payments', widget=widgets.RadioSelect) Num_Wrong_CC_7 = models.IntegerField(initial=0) CC_24_2 = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='[TRUE or FALSE] Owners perform two jobs: (1) make a choice that affects the asset’s final value, and (2) make a prediction about how much the asset’s final value will increase or decrease from its initial value of 150 points', widget=widgets.RadioSelect) CC_25_2 = models.IntegerField(label='Based on the Random, Bonus, and Cost Factors, the amount by which an asset’s value can increase or decrease ranges from +150 to -150 points. What is the minimum final value for an asset [IN POINTS]') CC_25_Max_2 = models.IntegerField(label='Based on the Random, Bonus, and Cost Factors, the amount by which an asset’s value can increase or decrease ranges from +150 to -150 points. What is the maximum final value for an asset [IN POINTS]') CC_26_2 = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='[TRUE or FALSE] The experiment will consist of several rounds of a market with three Owners and three Buyers. Therefore, in each round there will be three assets for Buyers to bid on', widget=widgets.RadioSelect) CC_27_2 = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='[TRUE or FALSE] Buyers view each Owner’s prediction of their asset’s final value, then decide how much to bid to “win” one share of each asset', widget=widgets.RadioSelect) CC_28_2 = models.IntegerField(label="Because the asset's final value can range from 0 to 300 and shares of the asset are worth 50% of the asset's final value, what is the minimum bid a Buyer can place on each asset? [IN POINTS]", max=300, min=0) CC_28_Max_2 = models.IntegerField(label="Because the asset's final value can range from 0 to 300 and shares of the asset are worth 50% of the asset's final value, what is the maximum bid a Buyer can place on each asset? [IN POINTS]", max=300, min=0) CC_29_2 = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='[TRUE or FALSE] The Buyer making the highest bid will earn points equal to 50% of the asset’s final value minus the amount bid', widget=widgets.RadioSelect) CC_30_2 = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='[TRUE or FALSE] Owners will earn points equal to 50% of their asset’s final value. Therefore, regardless of how much Buyers bid on the assets, Owners earn more points as the assets’ final values increase', widget=widgets.RadioSelect) CC_31_2 = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='[TRUE or FALSE] Owners will also receive 5 points if their prediction is within 50 points (in either direction) of the actual change in the asset’s value', widget=widgets.RadioSelect) CC_32_2 = models.IntegerField(choices=[[1, 'TRUE'], [2, 'FALSE']], label='[TRUE or FALSE] Owners and Buyers with the highest number of points at the end of the experiment will receive the highest payments', widget=widgets.RadioSelect) def cc_check(player: Player): #Check comprehension questions if player.CC_1 != 150: player.Num_Wrong_CC += 1 else: player.Num_Wrong_CC += 0 if player.CC_2 == 2: player.Num_Wrong_CC += 1 else: player.Num_Wrong_CC += 0 if player.CC_3 == 2: player.Num_Wrong_CC += 1 else: player.Num_Wrong_CC += 0 if player.CC_4 == 2: player.Num_Wrong_CC += 1 else: player.Num_Wrong_CC += 0 def CC_1_2_error_message(player: Player, value): if value != 150: return 'INCORRECT! Please try again' def CC_2_2_error_message(player: Player, value): if value == 2: return 'INCORRECT! Please try again' def CC_3_2_error_message(player: Player, value): if value == 2: return 'INCORRECT! Please try again' def CC_4_2_error_message(player: Player, value): if value == 2: return 'INCORRECT! Please try again' def cc_check_2(player: Player): #Check comprehension questions if player.CC_5 == 2: player.Num_Wrong_CC_2 += 1 else: player.Num_Wrong_CC_2 += 0 if player.CC_6 == 2: player.Num_Wrong_CC_2 += 1 else: player.Num_Wrong_CC_2 += 0 if player.CC_7 == 2: player.Num_Wrong_CC_2 += 1 else: player.Num_Wrong_CC_2 += 0 if player.CC_8 == 2: player.Num_Wrong_CC_2 += 1 else: player.Num_Wrong_CC_2 += 0 if player.CC_9 == 2: player.Num_Wrong_CC_2 += 1 else: player.Num_Wrong_CC_2 += 0 def CC_5_2_error_message(player: Player, value): if value == 2: return 'INCORRECT! Please try again' def CC_6_2_error_message(player: Player, value): if value == 2: return 'INCORRECT! Please try again' def CC_7_2_error_message(player: Player, value): if value == 2: return 'INCORRECT! Please try again' def CC_8_2_error_message(player: Player, value): if value == 2: return 'INCORRECT! Please try again' def CC_9_2_error_message(player: Player, value): if value == 2: return 'INCORRECT! Please try again' def cc_check_3(player: Player): #Check comprehension questions if player.CC_10 != 3: player.Num_Wrong_CC_3 += 1 else: player.Num_Wrong_CC_3 += 0 if player.CC_11 != 7: player.Num_Wrong_CC_3 += 1 else: player.Num_Wrong_CC_3 += 0 if player.CC_Extra == 2: player.Num_Wrong_CC_3 += 1 else: player.Num_Wrong_CC_3 += 0 def CC_10_2_error_message(player: Player, value): if value != 3: return 'INCORRECT! Please try again' def CC_11_2_error_message(player: Player, value): if value != 7: return 'INCORRECT! Please try again' def cc_check_4(player: Player): #Check comprehension questions if player.CC_12 == 2: player.Num_Wrong_CC_4 += 1 else: player.Num_Wrong_CC_4 += 0 if player.CC_13 == 2: player.Num_Wrong_CC_4 += 1 else: player.Num_Wrong_CC_4 += 0 if player.CC_14 == 2: player.Num_Wrong_CC_4 += 1 else: player.Num_Wrong_CC_4 += 0 def CC_12_2_error_message(player: Player, value): if value == 2: return 'INCORRECT! Please try again' def CC_13_2_error_message(player: Player, value): if value == 2: return 'INCORRECT! Please try again' def CC_14_2_error_message(player: Player, value): if value == 2: return 'INCORRECT! Please try again' def cc_check_5(player: Player): #Check comprehension questions if player.CC_16 == 2: player.Num_Wrong_CC_5 += 1 else: player.Num_Wrong_CC_5 += 0 if player.CC_17 == 2: player.Num_Wrong_CC_5 += 1 else: player.Num_Wrong_CC_5 += 0 if player.CC_18 == 2: player.Num_Wrong_CC_5 += 1 else: player.Num_Wrong_CC_5 += 0 if player.CC_19_B != 15: player.Num_Wrong_CC_5 += 1 else: player.Num_Wrong_CC_5 += 0 if player.CC_20_B != -15: player.Num_Wrong_CC_5 += 1 else: player.Num_Wrong_CC_5 += 0 if player.CC_21 == 2: player.Num_Wrong_CC_5 += 1 else: player.Num_Wrong_CC_5 += 0 def CC_16_2_error_message(player: Player, value): if value == 2: return 'INCORRECT! Please try again' def CC_17_2_error_message(player: Player, value): if value == 2: return 'INCORRECT! Please try again' def CC_18_2_error_message(player: Player, value): if value == 2: return 'INCORRECT! Please try again' def CC_19_A_2_error_message(player: Player, value): if value == 2: return 'INCORRECT! Please try again' def CC_19_B_2_error_message(player: Player, value): if value != 15: return 'INCORRECT! Please try again' def CC_20_A_2_error_message(player: Player, value): if value == 1: return 'INCORRECT! Please try again' def CC_20_B_2_error_message(player: Player, value): if value != -15: return 'INCORRECT! Please try again' def CC_21_2_error_message(player: Player, value): if value == 2: return 'INCORRECT! Please try again' def cc_check_6(player: Player): #Check comprehension questions if player.CC_22 == 2: player.Num_Wrong_CC_6 += 1 else: player.Num_Wrong_CC_6 += 0 if player.CC_23 == 2: player.Num_Wrong_CC_6 += 1 else: player.Num_Wrong_CC_6 += 0 def CC_22_2_error_message(player: Player, value): if value == 2: return 'INCORRECT! Please try again' def CC_23_2_error_message(player: Player, value): if value == 2: return 'INCORRECT! Please try again' def cc_check_7(player: Player): #Check comprehension questions if player.CC_24 == 2: player.Num_Wrong_CC_7 += 1 else: player.Num_Wrong_CC_7 += 0 if player.CC_25 != 0: player.Num_Wrong_CC_7 += 1 else: player.Num_Wrong_CC_7 += 0 if player.CC_25_Max != 300: player.Num_Wrong_CC_7 += 1 else: player.Num_Wrong_CC_7 += 0 if player.CC_26 == 2: player.Num_Wrong_CC_7 += 1 else: player.Num_Wrong_CC_7 += 0 if player.CC_27 == 2: player.Num_Wrong_CC_7 += 1 else: player.Num_Wrong_CC_7 += 0 if player.CC_28 != 0: player.Num_Wrong_CC_7 += 1 else: player.Num_Wrong_CC_7 += 0 if player.CC_28_Max != 150: player.Num_Wrong_CC_7 += 1 else: player.Num_Wrong_CC_7 += 0 if player.CC_29 == 2: player.Num_Wrong_CC_7 += 1 else: player.Num_Wrong_CC_7 += 0 if player.CC_30 == 2: player.Num_Wrong_CC_7 += 1 else: player.Num_Wrong_CC_7 += 0 if player.CC_31 == 2: player.Num_Wrong_CC_7 += 1 else: player.Num_Wrong_CC_7 += 0 if player.CC_32 == 2: player.Num_Wrong_CC_7 += 1 else: player.Num_Wrong_CC_7 += 0 def CC_24_2_error_message(player: Player, value): if value == 2: return 'INCORRECT! Please try again' def CC_25_2_error_message(player: Player, value): if value != 0: return 'INCORRECT! Please try again' def CC_26_2_error_message(player: Player, value): if value == 2: return 'INCORRECT! Please try again' def CC_27_2_error_message(player: Player, value): if value == 2: return 'INCORRECT! Please try again' def CC_28_2_error_message(player: Player, value): if value != 0: return 'INCORRECT! Please try again' def CC_29_2_error_message(player: Player, value): if value == 2: return 'INCORRECT! Please try again' def CC_30_2_error_message(player: Player, value): if value == 2: return 'INCORRECT! Please try again' def CC_31_2_error_message(player: Player, value): if value == 2: return 'INCORRECT! Please try again' def CC_32_2_error_message(player: Player, value): if value == 2: return 'INCORRECT! Please try again' def CC_Extra_2_error_message(player: Player, value): if value == 2: return 'INCORRECT! Please try again' def CC_25_Max_2_error_message(player: Player, value): if value != 300: return 'INCORRECT! Please try again' def CC_28_Max_2_error_message(player: Player, value): if value != 150: return 'INCORRECT! Please try again' Player.cc_check = cc_check Player.CC_1_2_error_message = CC_1_2_error_message Player.CC_2_2_error_message = CC_2_2_error_message Player.CC_3_2_error_message = CC_3_2_error_message Player.CC_4_2_error_message = CC_4_2_error_message Player.cc_check_2 = cc_check_2 Player.CC_5_2_error_message = CC_5_2_error_message Player.CC_6_2_error_message = CC_6_2_error_message Player.CC_7_2_error_message = CC_7_2_error_message Player.CC_8_2_error_message = CC_8_2_error_message Player.CC_9_2_error_message = CC_9_2_error_message Player.cc_check_3 = cc_check_3 Player.CC_10_2_error_message = CC_10_2_error_message Player.CC_11_2_error_message = CC_11_2_error_message Player.cc_check_4 = cc_check_4 Player.CC_12_2_error_message = CC_12_2_error_message Player.CC_13_2_error_message = CC_13_2_error_message Player.CC_14_2_error_message = CC_14_2_error_message Player.cc_check_5 = cc_check_5 Player.CC_16_2_error_message = CC_16_2_error_message Player.CC_17_2_error_message = CC_17_2_error_message Player.CC_18_2_error_message = CC_18_2_error_message Player.CC_19_A_2_error_message = CC_19_A_2_error_message Player.CC_19_B_2_error_message = CC_19_B_2_error_message Player.CC_20_A_2_error_message = CC_20_A_2_error_message Player.CC_20_B_2_error_message = CC_20_B_2_error_message Player.CC_21_2_error_message = CC_21_2_error_message Player.cc_check_6 = cc_check_6 Player.CC_22_2_error_message = CC_22_2_error_message Player.CC_23_2_error_message = CC_23_2_error_message Player.cc_check_7 = cc_check_7 Player.CC_24_2_error_message = CC_24_2_error_message Player.CC_25_2_error_message = CC_25_2_error_message Player.CC_26_2_error_message = CC_26_2_error_message Player.CC_27_2_error_message = CC_27_2_error_message Player.CC_28_2_error_message = CC_28_2_error_message Player.CC_29_2_error_message = CC_29_2_error_message Player.CC_30_2_error_message = CC_30_2_error_message Player.CC_31_2_error_message = CC_31_2_error_message Player.CC_32_2_error_message = CC_32_2_error_message Player.CC_Extra_2_error_message = CC_Extra_2_error_message Player.CC_25_Max_2_error_message = CC_25_Max_2_error_message Player.CC_28_Max_2_error_message = CC_28_Max_2_error_message class Introduction_To_Experiment(Page): form_model = 'player' class Experiment_Overview(Page): form_model = 'player' class CC_Part_1_1(Page): form_model = 'player' form_fields = ['CC_1'] class CC_Part_1_1Failed(Page): form_model = 'player' form_fields = ['CC_1_2'] @staticmethod def is_displayed(player: Player): return player.CC_1 != 150 class CC_Part_1_2(Page): form_model = 'player' form_fields = ['CC_2'] class CC_Part_1_2Failed(Page): form_model = 'player' form_fields = ['CC_2_2'] @staticmethod def is_displayed(player: Player): return player.CC_2 == 2 class CC_Part_1_3(Page): form_model = 'player' form_fields = ['CC_3'] class CC_Part_1_3Failed(Page): form_model = 'player' form_fields = ['CC_3_2'] @staticmethod def is_displayed(player: Player): return player.CC_3 == 2 class CC_Part_1_4(Page): form_model = 'player' form_fields = ['CC_4'] @staticmethod def before_next_page(player: Player, timeout_happened): player.cc_check() class CC_Part_1_4Failed(Page): form_model = 'player' form_fields = ['CC_4_2'] @staticmethod def is_displayed(player: Player): return player.CC_4 == 2 class Asset_Intro(Page): form_model = 'player' class CC_Part_2_5(Page): form_model = 'player' form_fields = ['CC_5'] class CC_Part_2_5Failed(Page): form_model = 'player' form_fields = ['CC_5_2'] @staticmethod def is_displayed(player: Player): return player.CC_5 == 2 class CC_Part_2_6(Page): form_model = 'player' form_fields = ['CC_6'] class CC_Part_2_6Failed(Page): form_model = 'player' form_fields = ['CC_6_2'] @staticmethod def is_displayed(player: Player): return player.CC_6 == 2 class CC_Part_2_7(Page): form_model = 'player' form_fields = ['CC_7'] class CC_Part_2_7Failed(Page): form_model = 'player' form_fields = ['CC_7_2'] @staticmethod def is_displayed(player: Player): return player.CC_7 == 2 class CC_Part_2_8(Page): form_model = 'player' form_fields = ['CC_8'] class CC_Part_2_8Failed(Page): form_model = 'player' form_fields = ['CC_8_2'] @staticmethod def is_displayed(player: Player): return player.CC_8 == 2 class CC_Part_2_9(Page): form_model = 'player' form_fields = ['CC_9'] @staticmethod def before_next_page(player: Player, timeout_happened): player.cc_check_2() class CC_Part_2_9Failed(Page): form_model = 'player' form_fields = ['CC_9_2'] @staticmethod def is_displayed(player: Player): return player.CC_9 == 2 class Owner_Part_1(Page): form_model = 'player' class CC_Part_3_10(Page): form_model = 'player' form_fields = ['CC_10'] class CC_Part_3_10Failed(Page): form_model = 'player' form_fields = ['CC_10_2'] @staticmethod def is_displayed(player: Player): return player.CC_10 != 3 class CC_Part_3_11(Page): form_model = 'player' form_fields = ['CC_11'] class CC_Part_3_11Failed(Page): form_model = 'player' form_fields = ['CC_11_2'] @staticmethod def is_displayed(player: Player): return player.CC_11 != 7 class CC_Part_3_Extra(Page): form_model = 'player' form_fields = ['CC_Extra'] @staticmethod def before_next_page(player: Player, timeout_happened): player.cc_check_3() class CC_Part_3_ExtraFailed(Page): form_model = 'player' form_fields = ['CC_Extra_2'] @staticmethod def is_displayed(player: Player): return player.CC_Extra == 2 class Owner_Part_2(Page): form_model = 'player' class CC_Part_4_12(Page): form_model = 'player' form_fields = ['CC_12'] class CC_Part_4_12Failed(Page): form_model = 'player' form_fields = ['CC_12_2'] @staticmethod def is_displayed(player: Player): return player.CC_12 == 2 class CC_Part_4_13(Page): form_model = 'player' form_fields = ['CC_13'] class CC_Part_4_13Failed(Page): form_model = 'player' form_fields = ['CC_13_2'] @staticmethod def is_displayed(player: Player): return player.CC_13 == 2 class CC_Part_4_14(Page): form_model = 'player' form_fields = ['CC_14'] @staticmethod def before_next_page(player: Player, timeout_happened): player.cc_check_4() class CC_Part_4_14Failed(Page): form_model = 'player' form_fields = ['CC_14_2'] @staticmethod def is_displayed(player: Player): return player.CC_14 == 2 class Buyers(Page): form_model = 'player' class CC_Part_5_16(Page): form_model = 'player' form_fields = ['CC_16'] class CC_Part_5_16Failed(Page): form_model = 'player' form_fields = ['CC_16_2'] @staticmethod def is_displayed(player: Player): return player.CC_16 == 2 class CC_Part_5_17(Page): form_model = 'player' form_fields = ['CC_17'] class CC_Part_5_17Failed(Page): form_model = 'player' form_fields = ['CC_17_2'] @staticmethod def is_displayed(player: Player): return player.CC_17 == 2 class CC_Part_5_18(Page): form_model = 'player' form_fields = ['CC_18'] class CC_Part_5_18Failed(Page): form_model = 'player' form_fields = ['CC_18_2'] @staticmethod def is_displayed(player: Player): return player.CC_18 == 2 class CC_Part_5_19(Page): form_model = 'player' form_fields = ['CC_19_B'] class CC_Part_5_19Failed(Page): form_model = 'player' form_fields = ['CC_19_B_2'] @staticmethod def is_displayed(player: Player): return player.CC_19_B != 15 class CC_Part_5_20(Page): form_model = 'player' form_fields = ['CC_20_B'] class CC_Part_5_20Failed(Page): form_model = 'player' form_fields = ['CC_20_B_2'] @staticmethod def is_displayed(player: Player): return player.CC_20_B != -15 class CC_Part_5_21(Page): form_model = 'player' form_fields = ['CC_21'] @staticmethod def before_next_page(player: Player, timeout_happened): player.cc_check_5() class CC_Part_5_21Failed(Page): form_model = 'player' form_fields = ['CC_21_2'] @staticmethod def is_displayed(player: Player): return player.CC_21 == 2 class Owner_Points(Page): form_model = 'player' class CC_Part_6_22(Page): form_model = 'player' form_fields = ['CC_22'] class CC_Part_6_22Failed(Page): form_model = 'player' form_fields = ['CC_22_2'] @staticmethod def is_displayed(player: Player): return player.CC_22 == 2 class CC_Part_6_23(Page): form_model = 'player' form_fields = ['CC_23'] @staticmethod def before_next_page(player: Player, timeout_happened): player.cc_check_6() class CC_Part_6_23Failed(Page): form_model = 'player' form_fields = ['CC_23_2'] @staticmethod def is_displayed(player: Player): return player.CC_23 == 2 class Procedure(Page): form_model = 'player' class CC_Part_7(Page): form_model = 'player' form_fields = ['CC_24', 'CC_25', 'CC_25_Max', 'CC_26', 'CC_27', 'CC_28', 'CC_28_Max', 'CC_29', 'CC_30', 'CC_31', 'CC_32'] @staticmethod def before_next_page(player: Player, timeout_happened): player.cc_check_7() class CC_Part_7_24Failed(Page): form_model = 'player' form_fields = ['CC_24_2'] @staticmethod def is_displayed(player: Player): return player.CC_24 == 2 class CC_Part_7_25Failed(Page): form_model = 'player' form_fields = ['CC_25_2'] @staticmethod def is_displayed(player: Player): return player.CC_25 != 0 class CC_Part_7_25_MaxFailed(Page): form_model = 'player' form_fields = ['CC_25_Max_2'] @staticmethod def is_displayed(player: Player): return player.CC_25_Max != 300 class CC_Part_7_26Failed(Page): form_model = 'player' form_fields = ['CC_26_2'] @staticmethod def is_displayed(player: Player): return player.CC_26 == 2 class CC_Part_7_27Failed(Page): form_model = 'player' form_fields = ['CC_27_2'] @staticmethod def is_displayed(player: Player): return player.CC_27 == 2 class CC_Part_7_28Failed(Page): form_model = 'player' form_fields = ['CC_28_2'] @staticmethod def is_displayed(player: Player): return player.CC_28 != 0 class CC_Part_7_28_MaxFailed(Page): form_model = 'player' form_fields = ['CC_28_Max_2'] @staticmethod def is_displayed(player: Player): return player.CC_28_Max != 150 class CC_Part_7_29Failed(Page): form_model = 'player' form_fields = ['CC_29_2'] @staticmethod def is_displayed(player: Player): return player.CC_29 == 2 class CC_Part_7_30Failed(Page): form_model = 'player' form_fields = ['CC_30_2'] @staticmethod def is_displayed(player: Player): return player.CC_30 == 2 class CC_Part_7_31Failed(Page): form_model = 'player' form_fields = ['CC_31_2'] @staticmethod def is_displayed(player: Player): return player.CC_31 == 2 class CC_Part_7_32Failed(Page): form_model = 'player' form_fields = ['CC_32_2'] @staticmethod def is_displayed(player: Player): return player.CC_32 == 2 class Pre_Practice_Round(Page): form_model = 'player' page_sequence = [Introduction_To_Experiment, Experiment_Overview, CC_Part_1_1, CC_Part_1_1Failed, CC_Part_1_2, CC_Part_1_2Failed, CC_Part_1_3, CC_Part_1_3Failed, CC_Part_1_4, CC_Part_1_4Failed, Asset_Intro, CC_Part_2_5, CC_Part_2_5Failed, CC_Part_2_6, CC_Part_2_6Failed, CC_Part_2_7, CC_Part_2_7Failed, CC_Part_2_8, CC_Part_2_8Failed, CC_Part_2_9, CC_Part_2_9Failed, Owner_Part_1, CC_Part_3_10, CC_Part_3_10Failed, CC_Part_3_11, CC_Part_3_11Failed, CC_Part_3_Extra, CC_Part_3_ExtraFailed, Owner_Part_2, CC_Part_4_12, CC_Part_4_12Failed, CC_Part_4_13, CC_Part_4_13Failed, CC_Part_4_14, CC_Part_4_14Failed, Buyers, CC_Part_5_16, CC_Part_5_16Failed, CC_Part_5_17, CC_Part_5_17Failed, CC_Part_5_18, CC_Part_5_18Failed, CC_Part_5_19, CC_Part_5_19Failed, CC_Part_5_20, CC_Part_5_20Failed, CC_Part_5_21, CC_Part_5_21Failed, Owner_Points, CC_Part_6_22, CC_Part_6_22Failed, CC_Part_6_23, CC_Part_6_23Failed, Procedure, CC_Part_7, CC_Part_7_24Failed, CC_Part_7_25Failed, CC_Part_7_25_MaxFailed, CC_Part_7_26Failed, CC_Part_7_27Failed, CC_Part_7_28Failed, CC_Part_7_28_MaxFailed, CC_Part_7_29Failed, CC_Part_7_30Failed, CC_Part_7_31Failed, CC_Part_7_32Failed, Pre_Practice_Round]