from otree.api import * c = cu doc = '' class C(BaseConstants): # built-in constants NAME_IN_URL = 'advisors_revision' PLAYERS_PER_GROUP = None NUM_ROUNDS = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): ic1 = models.StringField(choices=[['Yes', 'Yes']], label='I have read the information above and consent to take part in this study.', widget=widgets.RadioSelect) ic2 = models.StringField(choices=[['Yes', 'Yes']], label='I understand that anonymous data that cannot be trace back to me individually may be used in academic publications and shared in accordance with open science guidelines and I consent to this.', widget=widgets.RadioSelect) ic3 = models.StringField(choices=[['Yes', 'Yes']], label='I understand that the legal basis for processing any personal information about me is my consent', widget=widgets.RadioSelect) ic4 = models.StringField(choices=[['Yes', 'Yes']], label='I understand that I can withdraw at any time from the study by closing my browser window but that it will be difficult or impossible to withdraw my data once the task has been submitted.', widget=widgets.RadioSelect) ic5 = models.StringField(choices=[['Yes', 'Yes']], label='I confirm that I am over 18.', widget=widgets.RadioSelect) comp1 = models.StringField(choices=[['0.10£', '0.10£'], ['0.20£', '0.20£'], ['0.30£', '0.30£'], ['0.40£', '0.40£']], label='"How much bonus will you get for every 50 fish you catch?', widget=widgets.RadioSelect) comp2 = models.StringField(choices=[['1', '1'], ['2', '2'], ['3', '3'], ['4', '4']], label='How many fishing vacations are in this task?', widget=widgets.RadioSelect) choice = models.StringField(choices=[['Bagel', 'Bagel'], ['Pacman', 'Pacman']], label='Choose a lake:') age = models.IntegerField(label='What is your year of birth?', max=100, min=18) sex = models.StringField(choices=[['Female', 'Female'], ['Male', 'Male']], label='Male', widget=widgets.RadioSelect) gender = models.StringField(choices=[['Yes', 'Yes'], ['No', 'No - Please specify']], label='Is the gender you identify with the same as your sex registered at birth?', widget=widgets.RadioSelect) age2 = models.IntegerField(label='what is your age', max=100, min=18) def custom_export(players): yield ['participant_code', 'id_in_group'] for p in players: pp = p.participant yield [pp.code, p.id_in_group] class IC(Page): form_model = 'player' form_fields = ['ic1', 'ic2', 'ic3', 'ic4', 'ic5'] class Instructions(Page): form_model = 'player' class Comprehension(Page): form_model = 'player' form_fields = ['comp1', 'comp2'] class Transition(Page): form_model = 'player' form_fields = ['choice'] class Reward(Page): form_model = 'player' class Demographics(Page): form_model = 'player' form_fields = ['age', 'sex', 'gender'] class Choice(Page): form_model = 'player' page_sequence = [IC, Instructions, Comprehension, Transition, Reward, Demographics, Choice]