from otree.api import * #import pandas as pd import csv import random doc = """ Questionnaire """ ############################################### class Constants(BaseConstants): name_in_url = 'ExPost_RE_B' players_per_group = None num_rounds = 1 base_payment = 14 extra_payoff = 6 Choices= [ [1, 'very unimportant'], [2, 'rather unimportant'], [3, 'neither important nor unimportant'], [4, 'rather important'], [5, 'very important'], ] class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): extrapayofftotal = models.IntegerField() difficulty_re = models.IntegerField( label='How difficult did you find to transcribe the sequences?', choices= [ [1, 'very easy'], [2, 'rather easy'], [3, 'neither difficult nor easy'], [4, 'rather difficult'], [5, 'very difficult'], ], widget=widgets.RadioSelect ) enjoyable_re = models.IntegerField( label='How enjoyable did you find to transcribe the sequences?', choices= [[1, 'very unpleasant'], [2, 'somewhat unpleasant'], [3, 'neither enjoyable nor unpleasant'], [4, 'somewhat enjoyable'], [5, 'very enjoyable'], ], widget=widgets.RadioSelect ) concentration_re = models.IntegerField( label='How much concentration do you think transcribing the sequences requires?', choices=[ [1, 'no concentration at all'], [2, 'little concentration'], [3, 'some concentration'], [4, 'a lot of concentration'], [5, 'very much concentration'], ], widget=widgets.RadioSelect ) tryhard_re = models.IntegerField( label='How hard did you try to transcribe the sequences fast?', choices=[ [1, 'not hard at all'], [2, 'not very hard'], [3, 'rather hard'], [4, 'hard'], [5, 'very hard'], ], widget=widgets.RadioSelect ) egostudy_re = models.IntegerField( label='How high do you rate the importance of your performance in the transcription task for how well you succeed in your studies?', choices=Constants.Choices, widget=widgets.RadioSelect ) egowork_re = models.IntegerField( label='How high do you rate the importance of your performance in the transcription task for your success at work?', choices=Constants.Choices, widget=widgets.RadioSelect ) open_feedback = models.LongStringField(blank=True) ################################################################################################################### ################################## PAGES #################################################### ################################################################################################################### class Q1(Page): form_model = 'player' form_fields = ['difficulty_re', 'enjoyable_re', 'concentration_re'] class Q2(Page): form_model = 'player' form_fields = ['tryhard_re', 'egostudy_re', 'egowork_re'] class QOpen(Page): form_model = 'player' form_fields = ['open_feedback'] @staticmethod def before_next_page(player: Player, timeout_happened): player.extrapayofftotal = player.participant.extra_payoff class Part6(Page): pass class LastPage3(Page): pass page_sequence = [ Part6, Q1, Q2, QOpen, LastPage3 ]