from otree.api import * c = cu doc = '' 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): name = models.StringField(blank=True, label='(Optional) What is your name?') age = models.IntegerField(label='What is your age?', max=125, min=13) gender = models.StringField(choices=[['Male', 'Male'], ['Female', 'Female']], label='What is your gender?', widget=widgets.RadioSelect) math_major = models.BooleanField(label='Is your major in mathematics or statistics?') stat_score = models.StringField(choices=[['90-100', '90-100'], ['80-89', '80-89'], ['70-79', '70-79'], ['60-69', '60-69'], ['Not Applicable', 'Not Applicable']], label="What's your grade in Probability or Statistics course? (If you took multiple courses, please use your highest score.)") class Demographics(Page): form_model = 'player' form_fields = ['name', 'age', 'gender', 'math_major', 'stat_score'] class Farewell(Page): form_model = 'player' page_sequence = [Demographics, Farewell]