from otree.api import Currency as c, currency_range from ._builtin import Page, WaitPage from .models import Constants class Intro(Page): pass class Importance(Page): form_model = 'player' form_fields = [ 'covid_risk_importance', 'covid_present_importance', 'covid_grit_importance', 'covid_altruism_importance', 'covid_trust_importance', 'covid_redistribution_importance', 'covid_cooperation_importance', 'covid_competition_importance'] class Salience(Page): form_model = 'player' form_fields = ['salience'] def salience_choices(self): return Constants.salience_choices class Usage(Page): form_model = 'player' form_fields = ['usage'] def usage_choices(self): return Constants.salience_choices class Conformism(Page): form_model = 'player' form_fields = [ 'covid_risk_change', 'covid_present_change', 'covid_grit_change', 'covid_altruism_change', 'covid_trust_change', 'covid_redistribution_change', 'covid_cooperation_change', 'covid_competition_change', 'three_words', 'time_to_normal'] class Exposure(Page): form_model = 'player' form_fields = [ 'exposure_parents', 'exposure_infected', 'exposure_hospitalized', 'exposure_time_on_info', 'exposure_media', 'exposure_media_newspaper', 'exposure_media_other' ] def exposure_parents_choices(self): return Constants.parents_choices def exposure_infected_choices(self): return Constants.exposure_infected_choices def exposure_hospitalized_choices(self): return Constants.exposure_infected_choices class Compliance(Page): form_model = 'player' form_fields = ['compliance_mask', 'compliance_wash_hands', 'compliance_greet', 'compliance_distance'] class Mechanism(Page): form_model = 'player' form_fields = [ 'mechanism_classmate_contact', 'mechanism_teacher_contact', 'mechanism_parents_at_home', 'mechanism_siblings_at_home', 'mechanism_household_size', 'mechanism_parents_unemployed', 'mechanism_feedback' ] def mechanism_parents_at_home_choices(self): return Constants.parents_choices def mechanism_parents_unemployed_choices(self): return Constants.parents_choices def mechanism_siblings_at_home_choices(self): return Constants.mechanism_sibling_choices page_sequence = [Importance, Salience, Usage, Conformism, Exposure, Compliance, Mechanism]