from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range, ) author = 'Lilian Friedrich' doc = """ This is a questionnaire about socio-demographic characteristics of the participants """ class Constants(BaseConstants): name_in_url = 'Questionnaire' players_per_group = None num_rounds = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): age = models.StringField( label="Which age category are you in?", choices=[ "below 18", "18-24", "25-32", "33-40", "41-50", "51-60", "60 or above", ], widget=widgets.RadioSelectHorizontal ) gender = models.IntegerField( label="Please select your gender", choices=[ [0, 'female'], [1, 'male'], [2, 'prefer not to specify'], ], widget=widgets.RadioSelectHorizontal, ) # other1 = models.StringField( # label="other:", # blank=True, # ) nationality = models.StringField( label="Please write your country of citizenship in the box below. (e.g. Germany)", ) levelOfEducation = models.StringField( label="What is the highest degree or level of education you have completed?", choices=[ "less than High School diploma", "High School or equivalent", "Bachelor's degree (e.g. BA, BSc)", "Master's degree (e.g. MA, MS, MEd", "Doctorate (e.g. PhD, EdD)", "Other", ], ) # other2 = models.StringField( # label="other:", # blank=True, # ) employment = models.StringField( label="What is your current employment status?", choices=[ "Employed Full-time", "Employed part-time", "Unemployed", "Student", "Retired", "Self-Employed", "Unable to work", ] ) comment = models.TextField( label="If you want to add anything, please enter a comment below.", blank=True, )