from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range ) from django import forms OPTIONS1 = ( ("O10", "The original grade contained errors."), ("O11", "The grade I received in this course was below what I received in other courses."), ("O12", "The original grade was close to the next higher letter grade."), ("O13", "The original grade was below the grade required by my major/minor."), ("O14", "The original grade would result in academic probation."), ("O15", "The original grade would disqualify me from my financial aid."), ("O16", "The original grade would prevent me from graduation in a timely manner."), ("O17", "I deserved a better grade."), ("O18", "The instructor had the reputation to change student grades if asked."), ("O19", "It did not hurt to ask."), ("O20", "Others reasons:"), ) OPTIONS2 = ( ("O23", "The instructor would never change the grade."), ("O24", "I would have been embarrassed if the instructor had rejected my request."), ("O25", "It was too stressful to make such a request."), ("O26", "I was worried the instructor might lower the grade further, or punish me in some other way."), ("O27", "Other reasons:"), ) OPTIONS3 = ( ("O30", "The grades I have received have always been correct."), ("O31", "The grades I have received have always been fair."), ("O32", "The grades I have received have always met my expectations."), ("O33", "The instructors I have had would never change the grade."), ("O34", "I would have been embarrassed if the instructor had rejected my request."), ("O35", "It has never occurred to me that I could make such a request."), ("O36", "It would have been too stressful to make such a request."), ("O37", "I was worried the instructor might lower the grade further, or punish me in some other way."), ("O38", "Other reasons:"), ) author = 'Your name here' doc = """ Your app description """ class Constants(BaseConstants): name_in_url = 'mysurv1' players_per_group = None num_rounds = 3 class Subsession(BaseSubsession): pass # def creating_session(self): # play_round = self.round_number # self.session.vars['Class'] = play_round class Group(BaseGroup): pass class Player(BasePlayer): Q1 = models.BooleanField( choices=[ (True, 'Yes'), (False, 'No'), ], widget=widgets.RadioSelectHorizontal, label="", ) whynot = models.StringField( widget=forms.CheckboxSelectMultiple(choices=(OPTIONS3)), label="", blank=True, ) whynot_o = models.LongStringField(label='Are there any other reasons we did not mention above?', blank=True) Q1_1_1a = models.IntegerField( initial=0, min=0, max=100, label="Increased (0 - 100 percent)" ) Q1_1_1b = models.IntegerField( initial=0, min=0, max=100, label="Stayed the same (0 - 100 percent)" ) Q1_1_1c = models.IntegerField( initial=0, min=0, max=100, label="Decreased (0 - 100 percent)" ) Q1_1_2 = models.IntegerField( choices=[1, 2, 3, 4, 5, 6, 7], widget=widgets.RadioSelectHorizontal, label='On a scale from 1 (not stressed at all) to 7 (extremely stressed), ' 'how stressed would you have felt if you has asked the instructor to change your grade?' ) num_consider = models.IntegerField( choices=[ (1, 'One class'), (2, 'Two classes'), (3, 'Three classes'), (4, 'Four classes'), (5, 'Five or more classes'), ], label="", ) num_class = models.IntegerField() def assign_num_class(self): if self.Q1 is False: self.num_class = 0 else: self.num_class = self.num_consider Q2 = models.StringField( initial=None, choices=['Spring 2013', 'Summer 2013', 'Fall 2013', 'Spring 2014', 'Summer 2014', 'Fall 2014', 'Spring 2015', 'Summer 2015', 'Fall 2015', 'Spring 2016', 'Summer 2016', 'Fall 2016', 'Spring 2017', 'Summer 2017', 'Fall 2017', 'Spring 2018', 'Summer 2018', 'Fall 2018'], label="When did you take this course?" ) Q3 = models.StringField( choices=['Yes', 'No'], label="Were the course credits counted towards fulfilling your primary major's requirements?" ) college = models.StringField( choices=[ 'Agriculture', 'Business', 'Health and Human Sciences', 'Liberal Arts', 'Natural Sciences', 'Veterinary Medicine and Biomedical Sciences', 'Engineering', 'Natural Resources', 'Other' ], label="Under which college was this course listed? College of _____." ) dept_ag = models.StringField( choices=[ 'Agricultural and Resource Economics', 'Animal Sciences', 'Bio-agricultural Sciences & Pest Management', 'Horticulture & Landscape Architecture', 'Soil and Crop Sciences', 'Other' ], label="Department of" ) dept_bz = models.StringField( choices=[ 'Accounting', 'Computer Information Systems', 'Finance and Real Estate', 'Management', 'Marketing', 'Other' ], label="Department of" ) dept_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="Department of" ) dept_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="Department of" ) dept_ns = models.StringField( choices=[ 'Biochemistry & Molecular Biology', 'Biology', 'Chemistry', 'Computer Science', 'Mathematics', 'Physics', 'Psychology', 'Statistics', 'Other' ], label="Department of" ) dept_vm = models.StringField( choices=[ 'Biomedical Sciences', 'Clinical Sciences', 'Environmental & Radiological Health Sciences', 'Microbiology, Immunology & Pathology', 'Other' ], label="Department of" ) dept_eg = models.StringField( choices=[ 'Atmospheric Science', 'Chemical and Biological Engineering', 'Civil and Environmental Engineering', 'Electrical and Computer Engineering', 'Mechanical Engineering', 'Other' ], label="Department of" ) dept_nr = models.StringField( choices=[ 'Ecosystem Science & Sustainability', 'Fish/Wildlife/Conservation Biology', 'Forest & Rangeland Stewardship', 'Geosciences', 'Human Dimensions of Natural Resources', 'Other' ], label="Department of" ) dept_other = models.StringField( choices=[ 'Intra-University', 'Undeclared', 'Other' ], label="Department of" ) Q6 = models.StringField( choices=[ 'Non-Hispanic white', 'Non-Hispanic black', 'Hispanic', 'Asian/Pacific Islander', 'Other', 'I do not know' ], widget=widgets.RadioSelectHorizontal, label="What was the race/ethnicity of the instructor?" ) Q7 = models.StringField( choices=['Female', 'Male'], widget=widgets.RadioSelectHorizontal, label="What was the sex of the instructor?" ) Q8 = models.StringField( choices=[ 'Full Professor', 'Associate Professor', 'Assistant Professor', 'Non-tenure track instructor', 'Graduate student', 'I do not know' ], widget=widgets.RadioSelectHorizontal, label="What was the course instructor's position?" ) Q9 = models.IntegerField( choices=[ (1, 'No more than 10 students.'), (2, '11 - 40 students'), (3, '41 - 90 students'), (4, '91 - 180 students'), (5, '181 - 270 students'), (6, 'More than 270 students'), ], label="Approximately how many students were in the class?" ) Q10 = models.IntegerField( min=0, max=100, label="Of these students, what proportion (between 0 (all female) and 100 (all male) percent) were male?" ) Q11 = models.IntegerField( min=0, max=168, label="How many hours per week on average did you spend on studying " "(including attending the class) for this course?" ) Q12 = models.IntegerField( min=0, max=100, label="What was your attendance rate (between 0 (never attended) and 100 (full attendance) percent)?" ) Q13 = models.StringField( choices=[ 'Never', 'Less than once a month', '1 - 3 times a month', 'More than 3 times a month' ], widget=widgets.RadioSelectHorizontal, label="How often did you meet with your instructor outside of the class throughout the semester?" ) Q14 = models.StringField( choices=[ 'A+', 'A', 'A-', 'B+', 'B', 'B-', 'C+', 'C', 'D', 'F' ], widget=widgets.RadioSelectHorizontal, label="BEFORE the class BEGAN, what was the grade you EXPECTED to receive for the course?" ) Q15 = models.StringField( choices=[ 'A+', 'A', 'A-', 'B+', 'B', 'B-', 'C+', 'C', 'D', 'F' ], widget=widgets.RadioSelectHorizontal, label="At the END of the SEMESTER, what was the grade you ORIGINALLY received for the course? " "By original grade, we mean the grade that was initially assigned to you " "before you made any regrade request, which may " "or may not have been changed later." ) Q16 = models.IntegerField( choices=[1, 2, 3, 4, 5, 6, 7], widget=widgets.RadioSelectHorizontal, label='On a scale from 1 (completely disagree) to 7 (completely agree), ' 'to what extent do you agree or disagree that the original grade you received ' 'at the end of the semester reflected your performance in the class?' ) Q17 = models.BooleanField( choices=[(True, 'Yes'), (False, 'No')], label="You said you had considered asking the instructor for a regrade. " "Did you actually ask the instructor for a regrade?" ) Q18 = models.StringField( widget=forms.CheckboxSelectMultiple( choices=[ (1, 'During the semester'), (2, 'At the end of the semester'), ] ) ) Q19 = models.StringField(widget=forms.CheckboxSelectMultiple(choices=(OPTIONS1))) Q19_o = models.LongStringField(label='Are there any other reasons we did not mention above?', blank=True) Q19_1a = models.IntegerField( initial=0, min=0, max=100, label="Increased (0 - 100 percent)" ) Q19_1b = models.IntegerField( initial=0, min=0, max=100, label="Stayed the same (0 - 100 percent)" ) Q19_1c = models.IntegerField( initial=0, min=0, max=100, label="Decreased (0 - 100 percent)" ) Q19_2 = models.IntegerField( choices=[ (1, "Increased"), (2, "Stayed the same"), (3, "Decreased"), ], widget=widgets.RadioSelectHorizontal, label="Increased" ) Q19_3 = models.StringField( choices=[ 'A+', 'A', 'A-', 'B+', 'B', 'B-', 'C+', 'C', 'D', 'F' ], widget=widgets.RadioSelectHorizontal, # label="After asking the instructor to reconsider your grade, what was the final result of your grade?" ) Q19_4 = models.IntegerField( choices=[1, 2, 3, 4, 5, 6, 7], widget=widgets.RadioSelectHorizontal, label='On a scale from 1 (not stressed at all) to 7 (extremely stressed), ' "how stressed did you feel when you asked the instructor to change your grade?" ) Q20 = models.StringField(widget=forms.CheckboxSelectMultiple(choices=(OPTIONS2),)) Q20_o = models.LongStringField(label='Are there any other reasons we did not mention above?', blank=True) Q20_1a = models.IntegerField( initial=0, min=0, max=100, label="Increased (0 - 100 percent)" ) Q20_1b = models.IntegerField( initial=0, min=0, max=100, label="Stayed the same (0 - 100 percent)" ) Q20_1c = models.IntegerField( initial=0, min=0, max=100, label="Decreased (0 - 100 percent)" ) Q20_2 = models.IntegerField( choices=[1, 2, 3, 4, 5, 6, 7], widget=widgets.RadioSelectHorizontal, label='On a scale from 1 (not stressed at all) to 7 (extremely stressed), ' 'how stressed would you have felt if you had asked the instructor to change your grade?' )