from otree.api import * from withdrawal import ExperimentPage doc = """ General instructions shown before the five games in the formal study. """ class C(BaseConstants): NAME_IN_URL = 'general_instruction' PLAYERS_PER_GROUP = None NUM_ROUNDS = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): age = models.IntegerField(min=18, max=120, label='What is your age?') gender = models.StringField( choices=[ 'Woman', 'Man', 'Non-binary', 'Another gender identity', 'Prefer not to say', ], label='What is your gender?', widget=widgets.RadioSelect, ) attention_number = models.IntegerField( label='Please write “twenty-five” using numbers.' ) attention_agreement = models.StringField( choices=[ 'Strongly agree', 'Agree', 'Somewhat agree', 'Neither agree nor disagree', 'Somewhat disagree', 'Disagree', 'Strongly disagree', ], label=( 'Help us keep track of who is paying attention. ' 'Please select “Somewhat disagree” from the options below.' ), widget=widgets.RadioSelect, ) class Demographics(ExperimentPage): form_model = 'player' form_fields = ['age', 'gender'] class AttentionNumber(ExperimentPage): form_model = 'player' form_fields = ['attention_number'] class AttentionAgreement(ExperimentPage): form_model = 'player' form_fields = ['attention_agreement'] class GeneralInstruction(ExperimentPage): pass page_sequence = [ Demographics, AttentionNumber, AttentionAgreement, GeneralInstruction, ]