from otree.api import * c = cu doc = '' class C(BaseConstants): NAME_IN_URL = 'demographic_questions' PLAYERS_PER_GROUP = None NUM_ROUNDS = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): gender = models.StringField(choices=[['Male', 'Male'], ['Female', 'Female'], ['Other', 'Other'], ['Prefer not to say', 'Prefer not to say']], label='What is your gender? ') age = models.IntegerField(label='What is your age?') formal_training = models.IntegerField(label='How many years of formal musical training have you had? (enter 0 if none)') informal_training = models.IntegerField(label='How many years of informal musical training have you had? (enter 0 if none)') handedness = models.StringField(choices=[['Left', 'Left'], ['Right', 'Right']], label='What is your dominant hand?') IOS = models.IntegerField(choices=[[1, '1'], [2, '2'], [3, '3'], [4, '4'], [5, '5'], [6, '6'], [7, '7']], label='Please choose the picture below that best describes your relationship with the other player', widget=widgets.RadioSelectHorizontal) class IOS_scale(Page): form_model = 'player' form_fields = ['IOS'] class Demographics(Page): form_model = 'player' form_fields = ['gender', 'age', 'formal_training', 'informal_training', 'handedness'] class Thanks(Page): form_model = 'player' page_sequence = [IOS_scale, Demographics, Thanks]