from otree.api import * c = cu doc = '' class Constants(BaseConstants): name_in_url = 'questionnaire' players_per_group = None num_rounds = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass # assign player attributes for questionnaire class Player(BasePlayer): study_major = models.StringField(choices = [ ['Assessment', 'Assessment'], ['Bachelor in Economics', 'Bachelor in Economics'], ['Bachelor in Business Administration', 'Bachelor in Business Administration'], ['Bachelor in Law', 'Bachelor in Law'], ['Bachelor in Law and Economics', 'Bachelor in Law and Economics'], ['Bachelor in International Affairs', 'Bachelor in International Affairs'], ['Master in Business Innovation', 'Master in Business Innovation'], ['Master in Marketing Management', 'Master in Marketing Management'], ['Master in Accounting and Finance', 'Master in Accounting and Finance'], ['Master in Strategy and International Management', 'Master in Strategy and International Management'], ['Master in Business Management', 'Master in Business Management'], ['Master in Management, Organization Studies and Cultural Theory ', 'Master in Management, Organization Studies and Cultural Theory '], ['Master in Banking and Finance', 'Master in Banking and Finance'], ['Master in Economics', 'Master in Economics'], ['Master in Quantitative Economics and Finance', 'Master in Quantitative Economics and Finance'], ['Master in International Affairs and Governance', 'Master in International Affairs and Governance'], ['Master in International Law', 'Master in International Law'], ['Master in Law', 'Master in Law'], ['Master in Law and Economics', 'Master in Law and Economics'], ['Master in Computer Science', 'Master in Computer Science'], ['CEMS Master in International Management', 'CEMS Master in International Management'], ['Ph.D. in Management', 'Ph.D. in Management'], ['Ph.D. in Finance', 'Ph.D. in Finance'], ['Ph.D. in Economics and Finance', 'Ph.D. in Economics and Finance'], ['Ph.D. in Computer Science', 'Ph.D. in Computer Science'], ['Ph.D. in International Affairs and Political Economy', 'Ph.D. in International Affairs and Political Economy'], ['Ph.D. in Law', 'Ph.D. in Law'], ['Ph.D. in Organization Studies and Cultural Theory', 'Ph.D. in Organization Studies and Cultural Theory'] ], label='In which major do you study?') study_semester = models.StringField(choices = [['1-2', '1-2'], ['3-4', '3-4'], ['5-6', '5-6'], ['7-8', '7-8'], ['9-10', '9-10'], ['More', 'More']], label='In what semester do you study?') age = models.StringField(choices=[['2004 and younger', '2004 and younger'], ['2003', '2003'], ['2002', '2002'], ['2001', '2001'], ['2000', '2000'], ['1999', '1999'], ['1998', '1998'], ['1997', '1997'], ['1996', '1996'], ['1995', '1995'], ['1994', '1994'], ['1993', '1993'], ['1992', '1992'], ['1991', '1991'], ['1990 and older', '1990 and older']], label='What is your year of birth?') sex = models.StringField(choices=[['Female', 'Female'], ['Male', 'Male'], ['Additional category/identity not listed', 'Additional category/identity not listed'] ], label='What is your sex?') work = models.StringField(choices=[['0%', '0%'], ['10%', '10%'], ['20%', '20%'], ['30%', '30%'], ['40%', '40%'], ['50%', '50%'], ['60%', '60%'], ['70%', '70%'], ['80%', '80%'], ['90%', '90%'], ['100%', '100%']], label='How much (in percentages) do you work besides your studies?') patience = models.StringField(choices=[['Very patient', 'Very patient'], ['Patient', 'Patient'], ['More or less patient', 'More or less patient'], ['Undecided', 'Undecided'], ['More or less impatient', 'More or less impatient'], ['Impatient', 'Impatient'], ['Very impatient', 'Very impatient']], label='Are you generally an impatient person or someone who shows great patience?') risk = models.StringField(choices=[['Not at all willing to take risks', 'Not at all willing to take risks'], ['Not willing to take risks', 'Not willing to take risks'], ['More or less not willing to take risks', 'More or less not willing to take risks'], ['Undecided', 'Undecided'], ['More or less willing to take risks', 'More or less willing to take risks'], ['Willing to take risks', 'Willing to take risks'], ['Very willing to take risks', 'Very willing to take risks']], label='Are you generally willing to take risks or do you try to avoid risks?') punishment = models.StringField(choices=[['Very willing to do so', 'Very willing to do so'], ['Willing to do so', 'Willing to do so'], ['More or less willing to do so', 'More or less willing to do so'], ['Undecided', 'Undecided'], ['More or less unwilling to do so', 'More or less unwilling to do so'], ['Not willing to do so', 'Not willing to do so'], ['Not at all willing to do so', 'Not at all willing to do so']], label='How willing are you to punish someone who treats you unfairly, even if there may be costs for you?') class Welcome(Page): pass class WelcomeWaitPage(WaitPage): wait_for_all_groups = True class Questionnaire(Page): form_model = 'player' form_fields = ['study_major', 'study_semester', 'age', 'sex', 'work', 'patience', 'risk', 'punishment'] class End(Page): pass page_sequence = [Welcome, WelcomeWaitPage, Questionnaire]