from otree.api import * doc = """ Final survey """ class C(BaseConstants): NAME_IN_URL = 'survey' PLAYERS_PER_GROUP = None NUM_ROUNDS = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): age = models.IntegerField(label='What is your age?', min=13, max=125) gender = models.StringField( choices=[['Male', 'Male'], ['Female', 'Female'], ['Other', 'Other'], ['Prefer not to say', 'Prefer not to say']], label='What is your gender?', widget=widgets.RadioSelect, ) school_belonging = models.StringField( choices=[['TiSEM', 'School of Economics and Management (TiSEM)'], ['TLS', 'Law School (TLS)'], ['TSHD', 'School of Humanities and Digital Sciences (TSHD)'], ['TSB', 'School of Social and Behavioral Sciences (TSB)']], label="Which school are you enrolled in?", widget=widgets.RadioSelect, ) program_belonging = models.StringField( label='Which program are you currently enrolled in?' ) year_course = models.StringField( label='How long have you been enrolled in this program?' ) crt_bat = models.IntegerField( label=''' A bat and a ball cost 22 dollars in total. The bat costs 20 dollars more than the ball. How many dollars does the ball cost?''' ) crt_widget = models.IntegerField( label=''' If it takes 5 machines 5 minutes to make 5 widgets, how many minutes would it take 100 machines to make 100 widgets? ''' ) crt_lake = models.IntegerField( label=''' In a lake, there is a patch of lily pads. Every day, the patch doubles in size. If it takes 48 days for the patch to cover the entire lake, how many days would it take for the patch to cover half of the lake? ''' ) code_id = models.StringField( label="Write down your participant code." ) iban_1 = models.StringField( label="Write down your IBAN code. Make sure it is correct." ) iban_2 = models.StringField( label="Write down your IBAN code again, so we are sure it is the correct one." ) class Demographics(Page): form_model = 'player' form_fields = ['age', 'gender', 'school_belonging', 'program_belonging', 'year_course'] class CognitiveReflectionTest(Page): form_model = 'player' form_fields = ['crt_bat', 'crt_widget', 'crt_lake'] class Iban(Page): form_model = 'player' form_fields = ['code_id', 'iban_1', 'iban_2'] class EndPage(Page): pass page_sequence = [Demographics, CognitiveReflectionTest, Iban, EndPage]