from otree.api import * class C(BaseConstants): NAME_IN_URL = 'survey_baseline' PLAYERS_PER_GROUP = None NUM_ROUNDS = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): timeSpentSurveyBaseline = models.FloatField() gender = models.IntegerField( label="What is your gender?", choices=[ [1, 'Male'], [2, 'Female'], [3, 'Other'], ], ) age = models.IntegerField( min=0, max=100, label="What is your age?" ) education = models.StringField( choices=[ 'Elementary school', 'High school', 'College', 'Bachelor', 'Master', 'Doctoral Degree', 'Other', ], label="My highest education level is:", ) origin = models.StringField( choices=[ 'USA', 'India', 'Other', ], label="My Country of origin is:", ) english = models.IntegerField( widget = widgets.RadioSelect, min=1, max=5, choices = [1, 2, 3, 4, 5], label="How good is your English on a scale from 1 to 5? 5 is equivalent to a native speaker:" ) experience = models.IntegerField( widget=widgets.RadioSelect, choices=[ [1, '0-99'], [2, '100-499'], [3, '500-999'], [4, '1000-2000'], [5, '2000+'], ], label="What is the total amount of HITs you have done?", ) offer_1 = models.IntegerField(widget=widgets.RadioSelect, choices=[1, 2, 3, 4], label='I have been familiar with a similar Task before this Experiment (the one were you had to pick two numbers)') offer_2 = models.IntegerField(widget=widgets.RadioSelect, choices=[1, 2, 3, 4], label='I have been familiar with a similar "Matrix Task" before this Experiment') ABIC_1 = models.IntegerField(widget=widgets.RadioSelect, choices=[1, 2, 3, 4], label='I dont "pay attention"') ABIC_2 = models.IntegerField(widget=widgets.RadioSelect, choices=[1, 2, 3, 4], label='I am self-controlled') ABIC_3 = models.IntegerField(widget=widgets.RadioSelect, choices=[1, 2, 3, 4], label='I concentrate easily') ABIC_4 = models.IntegerField(widget=widgets.RadioSelect, choices=[1, 2, 3, 4], label='I am a careful thinker') ABIC_5 = models.IntegerField(widget=widgets.RadioSelect, choices=[1, 2, 3, 4], label='I am a steady thinker') ABIC_6 = models.IntegerField(widget=widgets.RadioSelect, choices=[1, 2, 3, 4], label='I do things without thinking') ABIC_7 = models.IntegerField(widget=widgets.RadioSelect, choices=[1, 2, 3, 4], label='I say things without thinking') ABIC_8 = models.IntegerField(widget=widgets.RadioSelect, choices=[1, 2, 3, 4], label='I act "on Impulse"') ABIC_9 = models.IntegerField(widget=widgets.RadioSelect, choices=[1, 2, 3, 4], label='I act on the spur of the moment') ABIC_10 = models.IntegerField(widget=widgets.RadioSelect, choices=[1, 2, 3, 4], label='I plan tasks carefully') ABIC_11 = models.IntegerField(widget=widgets.RadioSelect, choices=[1, 2, 3, 4], label='I plan trips well ahead of time') ABIC_12 = models.IntegerField(widget=widgets.RadioSelect, choices=[1, 2, 3, 4], label='I plan for job security') ABIC_13 = models.IntegerField(widget=widgets.RadioSelect, choices=[1, 2, 3, 4], label='I am future oriented') experience2 = models.IntegerField( widget= widgets.RadioSelect, choices=[ [1, '0-99'], [2, '100-499'], [3, '500-999'], [4, '1000-2000'], [5, '2000+'], ], label="What is the total amount of HITs you have done? Please select the answer '0-99' to prove you read this." ) suggestions_box = models.StringField(label="Do you have any recommendations or comments on this experiment? No input is required.", blank=True) Oddity_3 = models.IntegerField(widget=widgets.RadioSelect, choices=[1, 2, 3, 4], label='Please select the leftmost option to show you read and understood this text') Oddity_1 = models.IntegerField(widget=widgets.RadioSelect, choices=[1, 2, 3, 4], label='I was born before 1950') Oddity_2 = models.IntegerField(widget=widgets.RadioSelect, choices=[1, 2, 3, 4], label='Is the following Statement true?: bee rhymes with tree') self_evaluation = models.IntegerField( widget=widgets.RadioSelect, choices=[ [1, 'Yes, they are usable'], [2, 'No, they should not be considered'], ], label="Did you answer the questions appropriately, so that they can be used for analysis?", ) # FUNCTIONS # PAGES class QuestionsBaseline(Page): form_model = 'player' form_fields = ['gender', 'age', 'education', 'origin', 'english', 'experience', 'offer_1', 'offer_2', 'Oddity_1', 'ABIC_6', 'ABIC_1', 'ABIC_12','ABIC_2', 'ABIC_10', 'Oddity_2', 'ABIC_11', 'ABIC_4', 'ABIC_5', 'ABIC_13', 'ABIC_7', 'Oddity_3', 'ABIC_8', 'ABIC_9', 'ABIC_3', 'experience2', 'suggestions_box'] class self_evaluation_page(Page): form_model = 'player' form_fields = ['self_evaluation'] @staticmethod def app_after_this_page(player, upcoming_apps): print('upcoming_apps is', upcoming_apps) if player.participant.survey == False: return "payment_info" page_sequence = [QuestionsBaseline, self_evaluation_page]