from otree.api import * c = Currency doc = """ Your app description """ class Constants(BaseConstants): name_in_url = 'csr_preq' players_per_group = None num_rounds = 1 preq_unique_id = ["unique_id"] preq_fields_1 = ["social_media", "good_health", "overbook", "shop_online"] preq_fields_2 = ["q1a", "q1b", "q1c", "q1d", "q1e"] preq_fields_3 = ["q2a", "q2b", "q2c"] preq_fields_dem = [ "demq1", "demq2", "demq3", "demq4", "demq5", "demq6", "demq7", "demq7a", "demq8a", "demq8b", "demq9" ] preq_fields = preq_unique_id + preq_fields_1 + preq_fields_2 + preq_fields_3 + preq_fields_dem class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): unique_id = models.StringField( label="Please enter your SONA ID here" ) social_media = models.IntegerField( label="(a) - How important is social media in your personal life?", min=1, max=11, blank=True) good_health = models.IntegerField( label="(b) - Which is more critical for maintaining good health, physical exercise or a healthy diet?", min=1, max=11, blank=True) overbook = models.IntegerField( label="(c) - How acceptable do you think it is for airlines to overbook flights?", min=1, max=11, blank=True) shop_online = models.IntegerField( label="(d) - How often do you shop online?", min=1, max=11, blank=True) q1a = models.IntegerField( min=1, max=11, label="(a) - How strongly do you personally believe that companies should" " engage in socially-responsible activities in general?", widget=widgets.RadioSelectHorizontal, choices=[ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], blank=True) q1b = models.IntegerField( label="(b) - How strongly do you personally believe that companies should engage in " "green initiatives?", min=1, max=11, widget=widgets.RadioSelectHorizontal, choices=[ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], blank=True) q1c = models.IntegerField( label="(c) - When you make payments on line, to what extent are you concerned about security?", widget=widgets. RadioSelectHorizontal, choices=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], min=1, max=11, blank=True) q1d = models.IntegerField( label="(d) - To what extent do you think public school teachers’ pay should be contingent on students’ " "academic performance?", widget=widgets.RadioSelectHorizontal, choices=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], min=1, max=11 , blank=True) q1e = models.IntegerField( label="(e) - How strongly do you personally believe that companies should sacrifice profitability to promote " "social causes?", widget=widgets.RadioSelectHorizontal, choices=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], min=1, max=11 , blank=True) q2a = models.IntegerField( label="(a) - Do you think texting while driving should be banned by law?", widget=widgets. RadioSelectHorizontal, choices=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], min=1, max=11, blank=True) q2b = models.IntegerField( label="(b) - Do you think the labeling of genetically modified food should be required by law? ", widget= widgets.RadioSelectHorizontal, choices=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], min=1, max=11, blank=True) q2c = models.IntegerField( label="(c) - Do you think Uber drivers should be regulated the same as taxi drivers?", widget=widgets. RadioSelectHorizontal, choices=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], min=1, max=11, blank=True) demq1 = models.StringField( label="(1) - Please indicate your gender.", widget=widgets.RadioSelect, choices=['Female', 'Male', 'Other', 'I prefer not to disclose'], blank=True) demq2 = models.IntegerField( label="(2) - What is your Age? (in years)", min=18, max=100, blank=True) demq3 = models.StringField( label="(3) - Are you a native English speaker?", widget=widgets.RadioSelect, choices=['Yes', 'No'], blank=True) demq4 = models.StringField( label="(4) - What is your standing in the University?", widget=widgets.RadioSelect, choices=['Undergraduate', 'Graduate', 'Other'], blank=True) demq5 = models.StringField( label="(5) - What is your year of study?", widget=widgets.RadioSelect, choices=['1st', '2nd', '3rd', '4th', '5th', 'Other'], blank=True) demq6 = models.StringField( label="(6) - In which Faculty are you registered?", widget=widgets.RadioSelect, choices=['Applied Health Sciences (AHS)', 'Arts (ARTS)', 'Engineering (ENG)', 'Environment (ENV)', 'Mathematics (MATH)', 'Science (SCI)', 'I prefer not to answer'], blank=True) demq7 = models.StringField( label="(7) - What is your major area of study based on the listing below?", widget=widgets.RadioSelect, choices=['Accounting', 'Finance', 'Dual Accounting (with another major)', 'Dual Finance (with another major', 'Other (Please answer question 7a)', 'I prefer not to answer'], blank=True) demq7a = models.StringField( label="(7a) - If you answered 'Other' to question 7, please indicate your major area of study here", blank=True) demq8a = models.IntegerField( label='(8a) - How many months of co-op experience do you have with a public accounting firm?', min=0, max=100 , blank=True) demq8b = models.IntegerField( label='(8b) - How many months of co-op experience do you have with a non-public accounting training office?', min=0, max=100, blank=True) demq9 = models.IntegerField( label='(9) - Not including co-op, how many months of full-time work experience do you have?', min=0, max=100 , blank=True) # PAGES class UniqueID(Page): form_model = "player" form_fields = Constants.preq_unique_id class P1(Page): form_model = "player" form_fields = Constants.preq_fields_1 class P2(Page): form_model = "player" form_fields = Constants.preq_fields_2 class P3(Page): form_model = "player" form_fields = Constants.preq_fields_3 class P4(Page): form_model = "player" form_fields = Constants.preq_fields_dem class P5(Page): pass page_sequence = [UniqueID, P1, P2, P3, P4, P5]