from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, ) author = 'Ankit Shanker' doc = """ """ class Constants(BaseConstants): name_in_url = 'Post_Survey' players_per_group = None num_rounds = 1 Trust_choices = [ [-2, "Cannot be trusted at all"], [-1, "Cannot be trusted"], [0, "Not sure"], [1, "Can be trusted"], [2, "Can be trusted a lot"] ] gender_choices = [ [1, "Male"], [2, "Female"], [3, "Other"], [4, "Prefer not to say"] ] age_choices = [ [1, "18 - 24"], [2, "25 - 34"], [3, "35 - 44"], [4, "45 - 54"], [5, "55 - 64"], [6, "65 +"] ] gen_soc_trust_choices = [ [1, "Most people can be trusted"], [2, "It depends on the person"], [3, "It depends on the situation"], [4, "You can't be too careful in dealing with people"], [5, "I don't know"], ] Prosocial_choices = [ [1, "Not at all important"], [2, "Slightly important"], [3, "Moderately important"], [4, "Very important"], [5, "Extremely important"], ] literacy_choices = [ [1, 'No formal education above age 16'], [2, 'Formal or Technical education after age of 16'], [3, 'School education up to age of 18'], [4, 'Degree(Bachelors) or equivalent'], [5, 'Degree(Masters) or other postgraduate qualification'], [6, 'Doctorate'] ] Compliance_choices = [ [1, 'Washing your hands more often'], [2, 'Touching your face less'], [3, 'Using Alcohol-based sanitizer more often'], [4, 'Avoiding social events (e.g., parties, family gatherings)'], [5, 'Avoiding Public Transport'], [6, 'Eating out less at restaurants'], [7, 'Working from home more often'], [8, 'Maintaining social distance in public'] ] SMedia_Use_Frequency_choices = [ [1, 'Daily'], [2, 'Every other day'], [3, 'Every two days'], [4, 'Once a week'], [5, 'Every hour'] ] SMedia_TimeSpent_choices = [ [1, 'Less than 30 mins'], [2, 'An Hour'], [3, '1-2 Hours'], [4, '3-4 Hours'], [5, 'More than 4 Hours'] ] vaccine_status_choices = [ [1, 'Yes'], [2, 'No'] ] class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): gender = models.IntegerField( label="What gender do you identify as?", choices=Constants.gender_choices, widget=widgets.RadioSelect, blank=True, ) age = models.IntegerField( label="How old are you?", choices=Constants.age_choices, widget=widgets.RadioSelect, blank=True, ) # Frequency of interaction with neighbors neighbor_interaction = models.IntegerField( label="How often do you interact with your neighbors?", choices=[ [1, "Rarely or never"], [2, "Occasionally"], [3, "Moderately often"], [4, "Frequently"], [5, "Very frequently"], ], widget=widgets.RadioSelect, blank=False, ) # Frequency of interaction with work colleagues colleague_interaction = models.IntegerField( label="How often do you interact with your work colleagues?", choices=[ [1, "Rarely or never"], [2, "Occasionally"], [3, "Moderately often"], [4, "Frequently"], [5, "Very frequently"], ], widget=widgets.RadioSelect, blank=False, ) # Frequency of interaction with family members family_interaction = models.IntegerField( label="How often do you interact with your family members?", choices=[ [1, "Rarely or never"], [2, "Occasionally"], [3, "Moderately often"], [4, "Frequently"], [5, "Very frequently"], ], widget=widgets.RadioSelect, blank=False, ) # Frequency of interaction with friends friend_interaction = models.IntegerField( label="How often do you interact with your friends?", choices=[ [1, "Rarely or never"], [2, "Occasionally"], [3, "Moderately often"], [4, "Frequently"], [5, "Very frequently"], ], widget=widgets.RadioSelect, blank=False, ) gen_soc_trust = models.IntegerField( label="Generally speaking, would you say most people can be trusted, or that you can't be too careful in " "dealing with people?", choices=Constants.gen_soc_trust_choices, widget=widgets.RadioSelect, blank=False, ) Prosocial = models.IntegerField( label="To what extent do you think it’s important to do things for the benefit of others and society, " "even if they have some costs to you personally?", choices=Constants.Prosocial_choices, widget=widgets.RadioSelect, blank=False, ) literacy = models.IntegerField( label="Please indicate your highest educational qualification:", choices=Constants.literacy_choices, widget=widgets.RadioSelect, blank=True, ) Compliance = models.IntegerField( label="Which of the following steps, if any, have you taken during the pandemic to prepare for the possibility" "of many cases of the coronavirus/COVID-19 in your community? Select all that apply", choices=Constants.Compliance_choices, widget=widgets.RadioSelect, blank=False, ) SMedia_Use_Frequency = models.IntegerField( label="How often do you check-in to your social media accounts in any given week?", choices=Constants.SMedia_Use_Frequency_choices, widget=widgets.RadioSelect, blank=False, ) SMedia_TimeSpent = models.IntegerField( label="On average, how much time do you spend on social media?", choices=Constants.SMedia_TimeSpent_choices, widget=widgets.RadioSelect, blank=False, ) vaccine_status = models.IntegerField( label="Have you been vaccinated against Coronavirus infection?", choices=Constants.vaccine_status_choices, widget=widgets.RadioSelect, blank=False, )