from otree.api import * c = cu doc = '' class Constants(BaseConstants): name_in_url = 'back_up' players_per_group = None num_rounds = 1 rob_benefit = cu(5) rob_lost = cu(10) finish_button_template = 'back_up/finish_button.html' slider_alex_erin_template = 'back_up/slider_alex_erin.html' slider_maybe_like_this_template = 'back_up/slider_maybe_like_this.html' group_attachment_slider_template = 'back_up/group_attachment_slider.html' class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): female = models.BooleanField(choices=[[True, 'female'], [False, 'male']], label='What is your gender?', widget=widgets.RadioSelectHorizontal) age = models.IntegerField(label='What is your age?', min=0) major = models.StringField(label='What is your major?') province = models.StringField(label='Which province do you come from?') urban = models.BooleanField(choices=[[True, 'city'], [False, 'countryside']], label='Do you come from city or countryside?', widget=widgets.RadioSelectHorizontal) income = models.IntegerField(choices=[[1, 'Less than $20,000'], [2, '$20,000 - $44,999'], [3, '$45,000 - $139,999'], [4, '$140,000 - $149,999'], [5, '$150,000 - $199,999'], [6, 'More than $200,000']], label='What is your household income?', widget=widgets.RadioSelectHorizontal) sibling = models.IntegerField(choices=[[0, '0'], [1, '1'], [2, '2'], [3, 'more than 2']], label='How many siblings do you have?', widget=widgets.RadioSelectHorizontal) ethnicity = models.IntegerField(choices=[[0, 'Han'], [1, 'Hui'], [2, 'Uyghur'], [3, 'Zang'], [4, 'other']], label='What is your ethnicity?', widget=widgets.RadioSelectHorizontal) religion = models.IntegerField(choices=[[0, 'none'], [1, 'Buddhism'], [2, 'Christianity'], [3, 'Islam'], [4, 'other']], label='What is your religion?', widget=widgets.RadioSelectHorizontal) party = models.BooleanField(choices=[[True, 'Yes'], [False, 'No']], label='Are you a party member or a probationary party member?', widget=widgets.RadioSelectHorizontal) view1 = models.IntegerField(choices=[[1, 'Strongly disagree'], [2, 'Disagree'], [3, 'Slightly disagree'], [4, 'Neutral'], [5, 'Slightly agree'], [6, 'Agree'], [7, 'Strongly agree']], label='1) CN2 should destroy money of B2.', widget=widgets.RadioSelect) view2 = models.IntegerField(choices=[[1, 'Strongly disagree'], [2, 'Disagree'], [3, 'Slightly disagree'], [4, 'Neutral'], [5, 'Slightly agree'], [6, 'Agree'], [7, 'Strongly agree']], label='2) CN1 will be relieved knowing that CN2 has destroyed money of B2.', widget=widgets.RadioSelect) view3 = models.IntegerField(choices=[[1, 'Strongly disagree'], [2, 'Disagree'], [3, 'Slightly disagree'], [4, 'Neutral'], [5, 'Slightly agree'], [6, 'Agree'], [7, 'Strongly agree']], label='3) CN3 will be relieved knowing that CN2 has destroyed money of B2.', widget=widgets.RadioSelect) view4 = models.IntegerField(choices=[[1, 'Strongly disagree'], [2, 'Disagree'], [3, 'Slightly disagree'], [4, 'Neutral'], [5, 'Slightly agree'], [6, 'Agree'], [7, 'Strongly agree']], label='4) The reputation of CN2 in the eyes of CN1 and CN3 will increase after they know that CN2 has destroyed money of B2.', widget=widgets.RadioSelect) identification = models.FloatField() overlap = models.FloatField() class Instruction(Page): form_model = 'player' class Group_attachment(Page): form_model = 'player' form_fields = ['identification', 'overlap'] class View_towards_VR(Page): form_model = 'player' form_fields = ['view1', 'view2', 'view3', 'view4'] class Demographics(Page): form_model = 'player' form_fields = ['female', 'age', 'major', 'province', 'urban', 'income', 'sibling', 'ethnicity', 'religion', 'party'] class Finsh(Page): form_model = 'player' page_sequence = [Instruction, Group_attachment, View_towards_VR, Demographics, Finsh]