from otree.api import * class Constants(BaseConstants): name_in_url = 'exit_survey' players_per_group = None num_rounds = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): decision_maker = models.StringField( label=" Who will get to decide how the money you earn is spent today?", choices=[ [1, "You only"], [2, "Your spouse only"], [3, 'You and your spouse jointly'] ], widget = widgets.RadioSelect ) money_usage = models.StringField( label=" You have earned an amount of X Ksh through today's exercise. How will you/your spouse/you and your spouse plan to spend/use it?", choices=[ [1, 'Food'], [2, 'School fees'], [3, 'Healthcare for family members'], [4, 'Healthcare for livestock'], [5, 'Feed for livestock'], [6, 'Personal care items'], [7, 'Savings'], [8, 'Transportation'], [9, 'Do not know'], [10, 'Other'] ], widget=widgets.RadioSelect, blank=True ) choice01_money_usage = models.BooleanField(label='Food', blank=True) choice02_money_usage = models.BooleanField(label='School fees', blank=True) choice03_money_usage = models.BooleanField(label='Healthcare for family members', blank=True) choice04_money_usage = models.BooleanField(label='Healthcare for livestock', blank=True) choice05_money_usage = models.BooleanField(label='Feed for livestock', blank=True) choice06_money_usage = models.BooleanField(label='Personal care items', blank=True) choice07_money_usage = models.BooleanField(label='Savings', blank=True) choice08_money_usage = models.BooleanField(label='Transportation', blank=True) choice09_money_usage = models.BooleanField(label='Do not know', blank=True) choice10_money_usage = models.BooleanField(label='Other', blank=True) money_usage_other = models.StringField( label= 'If other how would you like to use it', blank=True, ) milk_usage = models.StringField( label=" ", choices=[ [1, 'Household Consumption'], [2, 'Sell'], [3, 'Other'] ], widget=widgets.RadioSelect ) choice01_milk_usage = models.BooleanField(label='Household Consumption', blank=True) choice02_milk_usage = models.BooleanField(label='Sell', blank=True) choice03_milk_usage = models.BooleanField(label='Other', blank=True) milk_usage_other = models.StringField( label='If other how would you like to use it', blank=True ) ruminant_owner = models.StringField( label= "Do you own any large cattle?", choices=[ [1, 'Yes, Solely'], [2,'Yes, Jointly'], [3, 'Yes, Solely and jointly'], [4, 'No'] ], widget = widgets.RadioSelect ) ruminant_total = models.IntegerField( label='Total number owned' ) ruminant_solely = models.IntegerField( label='Number owned solely' ) ruminant_jointly = models.IntegerField( label='Number owned jointly' ) ruminant_cowner = models.StringField( label="With whom do you co-own the cattle?", choices=[ [1, 'Spouse'], [2, 'Other Household member'], [3, 'Non Household member'], [4, 'NA'] ], widget=widgets.RadioSelect ) choice01 = models.BooleanField(label='Give as gift', blank=True) choice02 = models.BooleanField(label='Sell', blank=True) choice03 = models.BooleanField(label='Loan to Someone else', blank=True) choice04 = models.BooleanField(label='Pledge as collateral', blank=True) choice05 = models.BooleanField(label='Slaughter', blank=True) choice06 = models.BooleanField(label='NA', blank=True) choice1 = models.BooleanField(label= 'Give as gift', blank=True) choice2 = models.BooleanField(label='Sell', blank=True) choice3 = models.BooleanField(label='Loan to Someone else', blank=True) choice4 = models.BooleanField(label='Pledge as collateral', blank=True) choice5 = models.BooleanField(label='Slaughter', blank=True) choice6 = models.BooleanField(label='NA', blank=True) education = models.StringField( label= "How many years of education have you completed?", choices=[ [1, 'None'], [2, 'Pre-school'], [3, 'Primary'], [4, 'Primary (not completed)'], [5, 'Secondary'], [6, 'Secondary (not completed)'], [7, 'Technical vocational'], [8, 'Tertiary'], [9, 'Tertiary (not completed)'], [10, 'Adult education'] ], widget=widgets.RadioSelect ) edu_read = models.StringField( label="Can you read a newspaper?", choices=[ [1, 'Yes'], [2, 'No'] ], widget=widgets.RadioSelect ) edu_write = models.StringField( label="Can you write a letter by yourself?", choices=[ [1, 'Yes'], [2, 'No'] ], widget=widgets.RadioSelect ) survey_difficulty = models.StringField( label="How hard was the survey for you?", choices=[ [1, 'Very hard'], [2, 'Hard'], [3, 'Neutral'], [4, 'Easy'], [5, 'Very easy'] ], widget=widgets.RadioSelect ) survey_administration = models.StringField( label=" How was the survey administered to this participant?", choices=[ [1, 'The enumerator read out loud to the participant'], [2, 'The participant read it by herself'], ], widget=widgets.RadioSelect ) survey_comprehension = models.StringField( label="In your opinion, the respondent understood the exercise well?", choices=[ [1, 'Strongly Disagree'], [2, 'Disagree'], [3, 'Neither Agree nor Disagree'], [4, 'Agree'], [5, 'Strongly Agree'] ], widget=widgets.RadioSelect ) enumerator_name = models.StringField( label="Please enter your name") class ParticipantPage(Page): form_model = 'player' form_fields = ['decision_maker', 'money_usage', 'ruminant_owner', 'ruminant_total', 'ruminant_solely', 'ruminant_jointly', 'ruminant_cowner', 'education', 'milk_usage_other', 'money_usage_other', 'edu_read', 'edu_write', 'choice1', 'choice2', 'choice3', 'choice4', 'choice5', 'choice6', 'choice01', 'choice02', 'choice03', 'choice04', 'choice05', 'choice06', 'survey_difficulty', 'choice01_money_usage', 'choice02_money_usage', 'choice03_money_usage', 'choice04_money_usage', 'choice05_money_usage', 'choice06_money_usage', 'choice07_money_usage', 'choice08_money_usage', 'choice09_money_usage', 'choice10_money_usage', 'choice01_milk_usage', 'choice02_milk_usage', 'choice03_milk_usage'] class EnumeratorPage(Page): form_model = 'player' form_fields = ['survey_administration', 'survey_comprehension','enumerator_name'] page_sequence = [ParticipantPage, EnumeratorPage]