from otree.api import * doc = """ Your app description """ class C(BaseConstants): NAME_IN_URL = 'morality_survey' PLAYERS_PER_GROUP = None NUM_ROUNDS = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): angry = models.IntegerField( label='How angry do you think Thando feels?', choices=[ [1, 'Not at all'], [2, 'Slightly'], [3, 'Indifferent'], [4, 'Very'], [5, 'Extremely'] ], widget=widgets.RadioSelect ) frustrated = models.IntegerField( label='How frustrated do you think Thando feels?', choices=[ [1, 'Not at all'], [2, 'Slightly'], [3, 'Indifferent'], [4, 'Very'], [5, 'Extremely'] ], widget=widgets.RadioSelect ) disappointed = models.IntegerField( label='How disappointed do you think Thando feels?', choices=[ [1, 'Not at all'], [2, 'Slightly'], [3, 'Indifferent'], [4, 'Very'], [5, 'Extremely'] ], widget=widgets.RadioSelect ) powerless = models.IntegerField( label='How powerless do you think Thando feels?', choices=[ [1, 'Not at all'], [2, 'Slightly'], [3, 'Indifferent'], [4, 'Very'], [5, 'Extremely'] ], widget=widgets.RadioSelect ) ease = models.IntegerField( label='How at ease do you think Thando feels?', choices=[ [1, 'Not at all'], [2, 'Slightly'], [3, 'Indifferent'], [4, 'Very'], [5, 'Extremely'] ], widget=widgets.RadioSelect ) vignette_1 = models.IntegerField( label=''' The next day, Thando sleeps later than usual and wakes up with loadshedding which slows down her morning routine. She arrives to work 45 minutes late and her boss is already in the office. What would you advise Thando to do?''', choices=[ [1, 'When Thando arrives at work, she should apologise to the line manager for being late because she overslept.'], [2, 'Only if the line manager asks: Thando should say that there was an accident and the traffic caused her to be late.'], [3, 'Thando should avoid her manager for the day.'], [4, 'Thando should work late to catch up on her missed work.'] ], widget=widgets.RadioSelect ) vignette_2 = models.IntegerField( label="The next day, Thando sleeps later than usual and wakes up with loadshedding which slows down her morning routine. She arrives to work 45 minutes late and her boss comes to the office 15 minutes after Thando. What would you advise Thando to do?", choices=[ [1, 'When Thando arrives at work, she should apologise to the line manager for being late because she overslept.'], [2, 'Thando should causally mention to her line manager that loadshedding is the reason that she is late today.'], [3, 'Only if the line manager asks: Thando should say that there was an accident and the traffic caused her to be late.'], [4, 'Thando should work late to catch up on her missed work.'] ], widget=widgets.RadioSelect ) vignette_3 = models.IntegerField( label="Thando is still upset that her line manager lied to the client about the reason for the late report. On her next work from home day what would you suggest Thando do?", choices=[ [1, 'Continue working as normal, Thando has things to do. '], [2, 'Take the day to relax, but respond to emails that come in. '], [3, 'She should phone her boss to say that her Wi-Fi has a network issue and that she will work offline, instead of working she can go do something fun.'] ], widget=widgets.RadioSelect ) vignette_4 = models.IntegerField( label="Later in the week, Thando is having a casual conversation with her unit chief. The unit chief mentions in confidence that Thando’s line manager has become overloaded with work delaying some reports. The unit chief asks Thando whether the asset report has been completed for their new client. Thando has not started the report yet. What should Thando say?", choices=[ [1, 'Thando should tell the unit chief that she has not started the report.'], [2, 'Thando can reply that the report is in progress. '], [3, 'Thando should say that a rough draft of the report has been sent to the line manager to look over. '] ], widget=widgets.RadioSelect ) vignette_5 = models.IntegerField( label="Thando has found another job and spends her last day in the office. Her office imports very expensive coffee which is Thando’s favourite. There are 3 packets of coffee in the office’s kitchen which lasts the office at least one month. What should Thando do?", choices=[ [1, 'Don’t take any coffee, Thando can import her own coffee.'], [2, 'Take the open packet of coffee, the company will still have enough coffee for a month. '], [3, 'Take a full packet of coffee because the company can afford it. '] ], widget=widgets.RadioSelect ) justified = models.IntegerField( label="Why would you tell Thando her actions are justified?", choices=[ [1, 'Thando hasn’t done anything wrong.'], [2, 'Thando has always done the right thing, a white lie doesn’t change that.'], [3, 'Thando did nothing wrong compared to the lie that the line manager told.'], [4, 'The manager did something wrong, not Thando.'] ], widget=widgets.RadioSelect ) # PAGES class FeelingsMorality(Page): form_model = 'player' form_fields = [ 'angry', 'frustrated', 'disappointed', 'powerless', 'ease' ] class Vignettes1(Page): form_model = 'player' form_fields = ['vignette_1'] class Vignettes2(Page): form_model = 'player' form_fields = ['vignette_2'] class Vignettes3(Page): form_model = 'player' form_fields = ['vignette_3'] class Vignettes4(Page): form_model = 'player' form_fields = ['vignette_4'] class Vignettes5(Page): form_model = 'player' form_fields = ['vignette_5', 'justified'] page_sequence = [FeelingsMorality, Vignettes1, Vignettes3, Vignettes4, Vignettes5]