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 = 'exp3' players_per_group = None num_rounds = 1 instructions_template = 'nc/Instructions.html' determined_series = [[16, 85, 119, 197, 265], [14, 64, 99, 210, 267], [44, 91, 125, 167, 265]] 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.StringField( choices=['An engineer', 'A company owner', 'I don\'t know'], widget=widgets.RadioSelect ) def CQ1_error_message(self, value): if value != 'A company owner': return 'In this experiment, your role is a company owner.' CQ2 = models.StringField( choices=['profits', 'losses', 'I don\'t know'], widget=widgets.RadioSelect ) def CQ2_error_message(self, value): if value != 'losses': return 'During the last 5 days, your company is making losses.' CQ3 = models.IntegerField() CQ4 = models.StringField( choices=['Forecasting daily company losses', 'Forecasting monthly company losses', 'Forecasting annual company losses', ], widget=widgets.RadioSelect ) def CQ4_error_message(self, value): if value != 'Forecasting daily company losses': return 'In this experiment, your main task is to forecast daily company losses.' CQ5 = models.StringField( choices=['tomorrow', '2 days from now', '3 days from now', ], widget=widgets.RadioSelect ) def CQ5_error_message(self, value): if value != 'tomorrow': return 'In the first step, the forecast horizon is tomorrow.' 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(100-1000). 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(100-1000). 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(100-1000). 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() 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 ) 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 )