from otree.api import * #LANGUAGE SETTINGS 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): s1_q1a = models.IntegerField( label='Which of the following best describes your sex?', choices=[[0, 'Female'],[1, 'Male'],[2, 'Prefer to self describe'],[3, 'Prefer not to say']], widget=widgets.RadioSelect ) s1_q1b = models.StringField( label='If you prefer to self describe, please do so here.', blank=True ) s1_q2 = models.IntegerField( label='Where did you study the ESO?', choices=[[1, 'Barcelona'],[2, 'Girona'],[3, 'Lleida'],[4, 'Tarragona'],[5, 'Other inside Spain'],[6, 'Other outside Spain']], widget=widgets.RadioSelect ) s2_q1 = models.IntegerField( label='I like exercises with numbers', choices=[[1, 'Strongly disagree'],[2, 'Disagree'],[3, 'Neutral'],[4, 'Agree'],[5, 'Strongly agree']], widget=widgets.RadioSelectHorizontal ) s2_q2 = models.IntegerField( label='I like writing exercises', choices=[[1, 'Strongly disagree'],[2, 'Disagree'],[3, 'Neutral'],[4, 'Agree'],[5, 'Strongly agree']], widget=widgets.RadioSelectHorizontal ) s2_q3 = models.IntegerField( label="I'm good with numbers", choices=[[1, 'Strongly disagree'],[2, 'Disagree'],[3, 'Neutral'],[4, 'Agree'],[5, 'Strongly agree']], widget=widgets.RadioSelectHorizontal ) s2_q4 = models.IntegerField( label="I'm good at writing", choices=[[1, 'Strongly disagree'],[2, 'Disagree'],[3, 'Neutral'],[4, 'Agree'],[5, 'Strongly agree']], widget=widgets.RadioSelectHorizontal ) s2_q5 = models.IntegerField( label="No matter what I do, I have the highest standards for myself", choices=[[1, 'Strongly disagree'],[2, 'Disagree'],[3, 'Neutral'],[4, 'Agree'],[5, 'Strongly agree']], widget=widgets.RadioSelectHorizontal ) s2_q6 = models.IntegerField( label="I never settle for second best", choices=[[1, 'Strongly disagree'],[2, 'Disagree'],[3, 'Neutral'],[4, 'Agree'],[5, 'Strongly agree']], widget=widgets.RadioSelectHorizontal ) s2_q7 = models.IntegerField( label="Whenever I'm faced with a choice, I try to imagine what all the other possibilities are, even ones that aren't present at the moment", choices=[[1, 'Strongly disagree'],[2, 'Disagree'],[3, 'Neutral'],[4, 'Agree'],[5, 'Strongly agree']], widget=widgets.RadioSelectHorizontal ) s3_q1 = models.IntegerField( label='A society should aim to equalize incomes', choices=[[1, 'Strongly disagree'],[2, 'Disagree'],[3, 'Neutral'],[4, 'Agree'],[5, 'Strongly agree']], widget=widgets.RadioSelectHorizontal ) s3_q2 = models.IntegerField( label='There are large differences in wages between men and women', choices=[[1, 'Strongly disagree'],[2, 'Disagree'],[3, 'Neutral'],[4, 'Agree'],[5, 'Strongly agree']], widget=widgets.RadioSelectHorizontal ) s3_q3 = models.IntegerField( label='Gender differences in wages are a problem', choices=[[1, 'Strongly disagree'],[2, 'Disagree'],[3, 'Neutral'],[4, 'Agree'],[5, 'Strongly agree']], widget=widgets.RadioSelectHorizontal ) s3_q4 = models.IntegerField( label='Men are more productive than women in the workplace', choices=[[1, 'Strongly disagree'],[2, 'Disagree'],[3, 'Neutral'],[4, 'Agree'],[5, 'Strongly agree']], widget=widgets.RadioSelectHorizontal ) s3_q5 = models.IntegerField( label='Women cannot be as productive as men in the workplace', choices=[[1, 'Strongly disagree'],[2, 'Disagree'],[3, 'Neutral'],[4, 'Agree'],[5, 'Strongly agree']], widget=widgets.RadioSelectHorizontal ) s3_q6 = models.IntegerField( label='Government should do more to promote wage equality between men and women', choices=[[1, 'Strongly disagree'],[2, 'Disagree'],[3, 'Neutral'],[4, 'Agree'],[5, 'Strongly agree']], widget=widgets.RadioSelectHorizontal ) s3_q7 = models.IntegerField( label='Do you support the enforcing gender quotas in hiring?', choices=[[1, 'Strongly disagree'],[2, 'Disagree'],[3, 'Neutral'],[4, 'Agree'],[5, 'Strongly agree']], widget=widgets.RadioSelectHorizontal ) s3_q8 = models.IntegerField( label='Do you support enforcing employers to give men and women equal pay for equal working conditions?', choices=[[1, 'Strongly disagree'],[2, 'Disagree'],[3, 'Neutral'],[4, 'Agree'],[5, 'Strongly agree']], widget=widgets.RadioSelectHorizontal ) s3_q9 = models.IntegerField( label='Do you support public funding for affordable child day care?', choices=[[1, 'Strongly disagree'],[2, 'Disagree'],[3, 'Neutral'],[4, 'Agree'],[5, 'Strongly agree']], widget=widgets.RadioSelectHorizontal ) s5_q1 = models.IntegerField( label="Choose a number between 0 and 100. Everyone will choose a number, we will calculate the average with all the numbers, and we will divide it by 2. Your goal is to be as close as possible to the resulting value.", min=0, max=100, ) # PAGES class Survey1(Page): form_model = 'player' form_fields = ['s1_q1a','s1_q1b','s1_q2'] class Survey2(Page): form_model = 'player' form_fields = ['s2_q1','s2_q2','s2_q3','s2_q4','s2_q5','s2_q6','s2_q7'] class Survey3(Page): form_model = 'player' form_fields = ['s3_q1', 's3_q2', 's3_q3', 's3_q4', 's3_q5', 's3_q6', 's3_q7', 's3_q8', 's3_q9'] class Survey5(Page): form_model = 'player' form_fields = ['s5_q1'] page_sequence = [Survey1,Survey3]