from otree.api import * c = cu doc = '' class Constants(BaseConstants): name_in_url = 'pilot_v1' players_per_group = None num_rounds = 1 rob_benefit = cu(5) rob_lost = cu(10) showup_fee = cu(5) finish_button_template = 'pilot_v1/finish_button.html' group_attachment_slider_template = 'pilot_v1/group_attachment_slider.html' group_attach_slider_chinese_template = 'pilot_v1/group_attach_slider_chinese.html' group_attach_slider_foreign_template = 'pilot_v1/group_attach_slider_foreign.html' flag_right_top_template = 'pilot_v1/flag_right_top.html' class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): birthday_china = models.BooleanField(choices=[[True, 'Odd'], [False, 'Even']], label='Is the last number of your day of birth odd or even?', widget=widgets.RadioSelectHorizontal) identification = models.FloatField() overlap = models.FloatField() attachment_china = models.BooleanField() view1 = models.IntegerField(choices=[[0, '0 - do not agree at all'], [1, '1'], [2, '2'], [3, '3'], [4, '4'], [5, '5'], [6, '6'], [7, '7'], [8, '8'], [9, '9'], [10, '10 - completely agree']], label='CN2 should destroy money of B2.') view2 = models.IntegerField(choices=[[0, '0 - do not agree at all'], [1, '1'], [2, '2'], [3, '3'], [4, '4'], [5, '5'], [6, '6'], [7, '7'], [8, '8'], [9, '9'], [10, '10 - completely agree']], label='CN1 will be relieved knowing that CN2 has destroyed money of B2.') view3 = models.IntegerField(choices=[[0, '0 - do not agree at all'], [1, '1'], [2, '2'], [3, '3'], [4, '4'], [5, '5'], [6, '6'], [7, '7'], [8, '8'], [9, '9'], [10, '10 - completely agree']], label='CN3 will be relieved knowing that CN2 has destroyed money of B2.') view4 = models.IntegerField(choices=[[0, '0 - do not agree at all'], [1, '1'], [2, '2'], [3, '3'], [4, '4'], [5, '5'], [6, '6'], [7, '7'], [8, '8'], [9, '9'], [10, '10 - completely agree']], label='The reputation of CN2 in the eyes of CN1 and CN3 will increase after they know that CN2 has destroyed money of B2.') hypothetical_VR = models.CurrencyField(min=0) class Instruction(Page): form_model = 'player' @staticmethod def before_next_page(player, timeout_happened): pass class Birthday(Page): form_model = 'player' form_fields = ['birthday_china'] @staticmethod def before_next_page(player, timeout_happened): player.attachment_china = player.birthday_china class Flag(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', 'hypothetical_VR'] @staticmethod def before_next_page(player, timeout_happened): participant = player.participant participant.payoff = Constants.showup_fee page_sequence = [Instruction, Birthday, Flag, Group_attachment, View_towards_VR]