from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range ) author = 'Your name here' doc = """ Your app description """ class Constants(BaseConstants): name_in_url = 'my_simple_survey' # name_in_url = 'my_class_info' players_per_group = None num_rounds = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): yr = models.StringField( choices=['Freshman', 'Sophomore', 'Junior', 'Senior'], widget=widgets.RadioSelectHorizontal, label="What is your class standing?" ) sex = models.StringField( choices=['Female', 'Male'], widget=widgets.RadioSelectHorizontal, label="What is your sex?" ) race = models.StringField( choices=['Non-Hispanic white', 'Non-Hispanic black', 'Hispanic', 'Asian/Pacific Islander', 'Other'], widget=widgets.RadioSelectHorizontal, label="What is your race/ethnicity?" ) hs_gpa = models.FloatField( min=0.00, max=4.00, label="What was your high school GPA?" ) gpa = models.FloatField( min=0.00, max=4.00, label="What is your current GPA?" ) college = models.StringField( choices=[ 'Agriculture', 'Business', 'Health and Human Sciences', 'Liberal Arts', 'Natural Sciences', 'Veterinary Medicine and Biomedical Sciences', 'Engineering', 'Natural Resources', 'Other' ], label="What is the college of your primary major?" ) major_ag = models.StringField( choices=[ 'Agricultural and Resource Economics', 'Animal Sciences', 'Bio-agricultural Sciences & Pest Management', 'Horticulture & Landscape Architecture', 'Soil and Crop Sciences', 'Other' ], label="What is your primary major?" ) major_bz = models.StringField( choices=[ 'Accounting', 'Computer Information Systems', 'Finance and Real Estate', 'Management', 'Marketing', 'Other' ], label="What is your primary major?" ) major_hs = models.StringField( choices=[ 'Construction Management', 'Design and Merchandising', 'Food Science and Human Nutrition', 'Health and Exercise Science', 'Human Development and Family Studies' 'Occupational Therapy', 'School of Education', 'School of Social Work', 'Other' ], label="What is your primary major?" ) major_la = models.StringField( choices=[ 'Anthropology', 'Art and Art History', 'Communication Studies', 'Economics', 'English', 'Ethnic Studies', 'History', 'Journalism and Media Communication', 'Languages, Literatures & Cultures', 'Philosophy', 'Political Science', 'Sociology', 'Other' ], label="What is your primary major?" ) major_ns = models.StringField( choices=[ 'Biochemistry & Molecular Biology', 'Biology', 'Chemistry', 'Computer Science', 'Mathematics', 'Physics', 'Psychology', 'Statistics', 'Other' ], label="What is your primary major?" ) major_vm = models.StringField( choices=[ 'Biomedical Sciences', 'Clinical Sciences', 'Environmental & Radiological Health Sciences', 'Microbiology, Immunology & Pathology', 'Other' ], label="What is your primary major?" ) major_eg = models.StringField( choices=[ 'Atmospheric Science', 'Chemical and Biological Engineering', 'Civil and Environmental Engineering', 'Electrical and Computer Engineering', 'Mechanical Engineering', 'Other' ], label="What is your primary major?" ) major_nr = models.StringField( choices=[ 'Ecosystem Science & Sustainability', 'Fish/Wildlife/Conservation Biology', 'Forest & Rangeland Stewardship', 'Geosciences', 'Human Dimensions of Natural Resources', 'Other' ], label="What is your primary major?" ) major_other = models.StringField( choices=[ 'Intra-University', 'Undeclared', 'Other' ], label="What is your primary major?" ) first_name = models.StringField(label="First Name") last_name = models.StringField(label="Last Name") std_id = models.IntegerField( min=100000000, max=999999999, label="CSU Student ID Number" ) email = models.StringField() def make_field5(label): return models.IntegerField( choices=[1, 2, 3, 4, 5], label=label, widget=widgets.RadioSelectHorizontal, ) q1 = make_field5('... is reserved.') q2 = make_field5('... is generally trusting.') q3 = make_field5('... tends to be lazy.') q4 = make_field5('... is relaxed, handles stress well.') q5 = make_field5('... has few artistic interests.') q6 = make_field5('... is outgoing, sociable.') q7 = make_field5('... tends to find fault with others.') q8 = make_field5('... does a thorough job.') q9 = make_field5('... gets nervous easily.') q10 = make_field5('... has an active imagination.') lottery_choice = models.IntegerField( choices=[ (0, 'A: 50% chance of receiving $16; B: 50% chance of receiving $16.'), (1, 'A: 50% chance of receiving $24; B: 50% chance of receiving $12.'), (2, 'A: 50% chance of receiving $32; B: 50% chance of receiving $8.'), (3, 'A: 50% chance of receiving $40; B: 50% chance of receiving $4.'), (4, 'A: 50% chance of receiving $48; B: 50% chance of receiving $0.'), ], widget=widgets.RadioSelect, label='Among the five choices listed below, which one do you prefer the most?' ) def make_field7(label): return models.IntegerField( choices=[1, 2, 3, 4, 5, 6, 7], label=label, widget=widgets.RadioSelectHorizontal, ) p2 = make_field7("") p3 = make_field7("") p4 = make_field7("") p5_1 = make_field7("I often find myself performing tasks that I had intended to do days before.") p5_2 = make_field7("I often regret not getting to tasks sooner.") p5_3 = make_field7("I work best at the last-minute when the pressure is really on.") p6_1 = make_field7("I regret not having asked my course instructor for a regrade during the semester.") p6_2 = make_field7("I regret not having asked my course instructor for a regrade at the end of the semester.") p6_3 = make_field7("I regret being too aggressive in my regrade request to my instructor during the semester.") p6_4 = make_field7("I regret being too aggressive in my regrade request to my instructor at the end of the semester.") p7 = models.IntegerField( choices=[ (1, 'Significant above average'), (2, 'Somewhat above average'), (3, 'Average'), (4, 'Somewhat below average'), (5, 'Significant below average'), ], widget=widgets.RadioSelect, ) followup = models.BooleanField( choices=[ (True, "Yes"), (False, "No"), ], label='Do you agree to be contacted via the email you provided for any follow-up studies in the future?' )