from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range, ) author = 'Nathaniel Burke' doc = """ Demographic Survey and CRT questions """ class Constants(BaseConstants): name_in_url = 'survey' players_per_group = None num_rounds = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): age = models.IntegerField(label='What is your age?', min=18, max=115) gender = models.IntegerField( choices=[[0, 'Male'], [1, 'Female']], label='What is your gender?', widget=widgets.RadioSelect, ) year = models.IntegerField( choices=[[1, 'Freshman'],[2,'Sophomore'],[3,'Junior'],[4,'Senior'],[5,'Masters Student'],[6,'Professional Degree Student'],[7,'Doctoral Student']], label='What is your academic standing?', widget=widgets.RadioSelect, ) zipcode = models.IntegerField(label='What is your childhood zipcode?', min=00000, max=99999) switchwhy = models.StringField(label="Why did you choose to switch groups or not switch groups?") contributionwhy = models.StringField(label="How did you decide how much to contribute?") groupiness2 = models.IntegerField( choices=[ [1, 'Very Close'], [2, 'Somewhat Close'], [3, 'Neutral'], [4, 'Somewhat Distant'], [5, 'Very Distant'], ], widget=widgets.RadioSelect, label="How close do you feel to your team from the anagram task?" ) athlete = models.IntegerField( label='Are you a varsity athlete?', choices=[[0, 'No'],[1, 'Yes']], widget=widgets.RadioSelectHorizontal ) greek = models.IntegerField( label='Are you a member of a Greek organization?', choices=[[0, 'No'],[1, 'Yes']], widget=widgets.RadioSelectHorizontal ) athlete2 = models.StringField(label='Which varsity team are you a member of?', blank=True) greek2 = models.StringField(label='Which Greek organization are you a member of?', blank=True) college = models.IntegerField( label='Which College are you enrolled in at the University of Arkansas?', choices=[[1,'Dale Bumpers College of Agricultural, Food and Life Sciences'], [2,'Fay Jones School of Architecture and Design'], [3,'J. William Fulbright College of Arts and Sciences'], [4,'Sam M. Walton College of Business'], [5,'College of Education and Health Professions'], [6,'College of Engineering'], [7,'School of Law']], widget=widgets.RadioSelect ) major = models.StringField(label='What is your major?') firstgen = models.IntegerField( label='Are you a first generation college student?', choices=[[0,'No'],[1,'Yes']], widget=widgets.RadioSelectHorizontal ) crt_bat = models.IntegerField( label=''' A bat and a ball cost 22 dollars in total. The bat costs 20 dollars more than the ball. How many dollars does the ball cost?''' ) crt_widget = models.IntegerField( label=''' "If it takes 5 machines 5 minutes to make 5 widgets, how many minutes would it take 100 machines to make 100 widgets?" ''' ) crt_lake = models.IntegerField( label=''' In a lake, there is a patch of lily pads. Every day, the patch doubles in size. If it takes 48 days for the patch to cover the entire lake, how many days would it take for the patch to cover half of the lake? ''' ) egg=models.CurrencyField( label='Choose one of the following gambles', ) black = models.IntegerField( label='Black/African/African-American', choices=[[0, 'No'],[1, 'Yes']], widget=widgets.RadioSelectHorizontal ) white = models.IntegerField( label='White/European/Caucasian', choices=[[0, 'No'],[1, 'Yes']], widget=widgets.RadioSelectHorizontal ) asian = models.IntegerField( label='Asian/Pacific Islander', choices=[[0, 'No'],[1, 'Yes']], widget=widgets.RadioSelectHorizontal ) native = models.IntegerField( label='Native American/Alaskan Native', choices=[[0, 'No'],[1, 'Yes']], widget=widgets.RadioSelectHorizontal ) mexican = models.IntegerField( label='Mexican', choices=[[0, 'No'],[1, 'Yes']], widget=widgets.RadioSelectHorizontal ) central = models.IntegerField( label='Central American', choices=[[0, 'No'],[1, 'Yes']], widget=widgets.RadioSelectHorizontal ) caribbean = models.IntegerField( label='Caribbean (Puerto Rican, Dominican, Cuban)', choices=[[0, 'No'],[1, 'Yes']], widget=widgets.RadioSelectHorizontal ) south = models.IntegerField( label='South American', choices=[[0, 'No'],[1, 'Yes']], widget=widgets.RadioSelectHorizontal )