from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range ) author = 'Your name here' doc = """ Your app description """ class Constants(BaseConstants): name_in_url = 'exp6' players_per_group = None num_rounds = 1 instructions_template = 'nc_c1l/Instructions.html' determined_series = [[10, 61, 68, 111, 140], [8, 40, 47, 124, 142], [38, 67, 73, 81, 140]] class Subsession(BaseSubsession): def creating_session(self): players = self.get_players() for p in players: p.new_round_number = p.round_number + 11 class Group(BaseGroup): pass class Player(BasePlayer): CQ1 = models.IntegerField() CQ2 = models.StringField( choices=['Forecasting daily infection cases', 'Forecasting monthly infection cases', 'Forecasting annual infection cases', ], widget=widgets.RadioSelect ) def CQ2_error_message(self, value): if value != 'Forecasting daily infection cases': return 'In this experiment, your main task is to forecast daily infection cases.' CQ3 = models.StringField( choices=['tomorrow', '2 days from now', '3 days from now', ], widget=widgets.RadioSelect ) def CQ3_error_message(self, value): if value != 'tomorrow': return 'In the first step, the forecast horizon is tomorrow.' CQ4 = models.StringField( choices=['True', 'False'], widget=widgets.RadioSelect ) def CQ4_error_message(self, value): if value != 'True': return 'The study setting is from a HYPOTHETICAL virus and not about COVID-19, so make sure that your judgment is not influenced by the current pandemic situation.' forecast_1 = models.IntegerField() def forecast_1_error_message(self, value): if value < 0 or value > 700: return 'Please make your forecast within the range of the graph(0-700). Please revise your forecast.' forecast_2 = models.IntegerField() def forecast_2_error_message(self, value): if value < 0 or value > 700: return 'Please make your forecast within the range of the graph(0-700). Please revise your forecast.' forecast_3 = models.IntegerField() def forecast_3_error_message(self, value): if value < 0 or value > 700: return 'Please make your forecast within the range of the graph(0-700). Please revise your forecast.' actual_1 = models.IntegerField() actual_2 = models.IntegerField() actual_3 = models.IntegerField() new_round_number = models.IntegerField() time_spent1 = models.FloatField() time_spent2 = models.FloatField() time_spent3 = models.FloatField() AQ1 = models.StringField( choices=['Yes', 'No'], widget=widgets.RadioSelect ) AQ2 = models.StringField( choices=['1', '2', '3', '4', '5', '6', '7'], widget=widgets.RadioSelect ) AQ3 = models.StringField( choices=['1', '2', '3', '4', '5', '6', '7'], widget=widgets.RadioSelect ) AQ4 = models.StringField( choices=['It was steeper than the first wave', 'It was about the same steepness as during the first wave', 'It was shallower than the first wave', 'I don’t remember'], widget=widgets.RadioSelect ) AQ5 = models.StringField( choices=['1', '2', '3', '4', '5', '6', '7'], widget=widgets.RadioSelect ) AQ6 = models.StringField( choices=['1', '2', '3', '4', '5', '6', '7'], widget=widgets.RadioSelect ) AQ7 = models.StringField( choices=['1', '2', '3', '4', '5', '6', '7'], widget=widgets.RadioSelect ) AQ8 = models.StringField( choices=['1', '2', '3', '4', '5', '6', '7'], widget=widgets.RadioSelect ) AQ9 = models.StringField( choices=['1', '2', '3', '4', '5', '6', '7'], widget=widgets.RadioSelect ) AQ10 = models.StringField( choices=['1', '2', '3', '4', '5', '6', '7'], widget=widgets.RadioSelect )