from ._builtin import Page, WaitPage from otree.api import Currency as c, currency_range from .models import Constants class Instructions1(Page): pass class Instructions2(Page): pass class Instructions3(Page): pass class Instructions4(Page): pass class Instructions5(Page): pass class Instructions6(Page): pass class Instructions7(Page): pass class Instructions8(Page): form_model = 'player' form_fields = ['PQ_1', 'PQ_2'] def error_message(self, values): print('values is', values) if values['PQ_1'] != "10": return 'You did not answer question 1 correctly. Please remember that: All units contributed to the common account will be multiplied with a certain factor called "the Multiplier". This means that every unit contributed to the common account will be worth more. For example, if the Multiplier is 2 and a person contributes 10 units to the common account, the common account will consist of 2 x 10 = 20 units.' if values['PQ_2'] != "20": return 'You did not answer question 2 correctly. Please remember that: Once multiplied, the total amount of units in the common account is split evenly among both persons, regardless of how much they contributed to the common account. For example, if the common account consists of 20 units, each person will receive 20 : 2 = 10 units.' class Instructions9(Page): pass class Instructions10(Page): pass class Instructions11(Page): pass class Instructions12Ass(Page): pass class Instructions13(Page): pass class Instructions14Ass(Page): pass class Instructions15(Page): pass class Instructions16(Page): pass class Instructions17(Page): pass class Instructions15a(Page): pass class Instructions16a(Page): pass class Instructions17a(Page): pass class Instructions18(Page): form_model = 'player' form_fields = ['PQ_3', 'PQ_4', 'PQ_5', 'PQ_6'] def error_message(self, values): print('values is', values) if values['PQ_3'] != "Correct": return 'You did not answer question 3 correctly. Please try again.' if values['PQ_4'] != "Correct": return 'You did not answer question 4 correctly. Please try again.' if values['PQ_5'] != "Correct": return 'You did not answer question 5 correctly. Please try again.' if values['PQ_6'] != "Correct": return 'You did not answer question 6 correctly. Please try again.' class Instructions19(Page): form_model = 'player' form_fields = ['PQ_7', 'PQ_8', 'PQ_9', 'PQ_10', 'PQ_11', 'PQ_12', 'PQ_13'] def error_message(self, values): print('values is', values) if values['PQ_7'] != "17": return 'You did not answer question 7 correctly. Please remember that: All units contributed to the common account will be multiplied with a certain factor called "the Multiplier". This means that every unit contributed to the common account will be worth more. For example, if the Multiplier is 2 and you contribute 10 units to the common account, the common account will consist of 2 x 10 = 20 units.' if values['PQ_8'] != "13": return 'You did not answer question 8 correctly. Please remember that: All units contributed to the common account will be multiplied with a certain factor called "the Multiplier". This means that every unit contributed to the common account will be worth more. For example, if the Multiplier is 2 and you contribute 10 units to the common account, the common account will consist of 2 x 10 = 20 units.' if values['PQ_9'] != "30": return 'You did not answer question 9 correctly. Please remember that: This common account is shared by you and the other person. This means that the total number of units in the common account consist of the contributions of you and the other person (after multiplication).' if values['PQ_10'] != "65": return 'You did not answer question 10 correctly. Please try again.' if values['PQ_11'] != "15": return 'You did not answer question 11 correctly. Please try again.' if values['PQ_12'] != "80": return 'You did not answer question 12 correctly. Please remember that: You will earn what you have kept + what you got from the common account. This means that if a you kept 20 units and got 10 units from the common account, you will earn 20 (the number of units kept) + 10 (the number of units from the common account) = 30 units.' if values['PQ_13'] != "30": return 'You did not answer question 13 correctly. Please remember that: You will earn what you have kept + what you got from the common account. This means that if a you kept 20 units and got 10 units from the common account, you will earn 20 (the number of units kept) + 10 (the number of units from the common account) = 30 units.' class Attention_Check_1_Page(Page): form_model = 'player' form_fields = ['Attention_Check_1'] class Instructions20(Page): pass class MyWaitPage(WaitPage): """Wait for other participants to start experiment""" body_text = "Other participants may take longer to read instructions or make decisions. We thank you for your patience!" class TreatmentPage (Page): pass page_sequence =[Instructions1, Instructions2, Instructions3, Instructions4, Instructions5, Instructions6, Instructions7, Instructions8, Instructions9, Instructions10, Instructions11, Instructions12Ass, Instructions13, Instructions14Ass, Instructions15, Instructions16, Instructions17, Instructions15a, Instructions16a, Instructions17a, Instructions18, Instructions19, Attention_Check_1_Page, TreatmentPage, MyWaitPage]