from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range, Page, WaitPage ) import csv cu = c doc = '' class Constants(BaseConstants): name_in_url = 'quest_ques' players_per_group = 3 payment_per_correct_answer = 1 score_per_correct_answer = 1 # num_rounds = len(questions) num_rounds = 1 player1_role = 'Player 1' player2_role = 'Player 2' player3_role = 'Player 3' class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): s1_player_payoff = models.FloatField() player_payoff = models.FloatField() total_game_payoff = models.FloatField() final_payoff = models.FloatField() serv_1a = models.IntegerField() serv_1b = models.IntegerField() serv_1c = models.IntegerField() serv_2 = models.LongStringField() serv_3 = models.BooleanField(choices=[ [False, 'Keep the earnings from time spent in the Game screen at 18p'], [True, 'Reduce the earnings from time spent in the Game screen to 16p'], ] ) serv_4 = models.LongStringField() serv_5 = models.LongStringField() serv_6 = models.IntegerField(label="Was the communication with your two teammates in the main task-solving stage in Phase 2 smooth enough? Please answer on a 5-point scale.", widget=widgets.RadioSelect, choices=[1,2,3,4,5]) serv_7a = models.LongStringField() serv_7b = models.IntegerField(label="Please rate the following statements below on a 7 point scale where 1 is completely agree and 7 is completely disagree: I identify with the members of my team.", widget=widgets.RadioSelect, choices=[1,2,3,4,5,6,7]) serv_7c = models.IntegerField(label="Please rate the following statements below on a 7 point scale where 1 is completely agree and 7 is completely disagree: People in my team generally are cooperative.", widget=widgets.RadioSelect, choices=[1,2,3,4,5,6,7]) serv_8 = models.IntegerField(label="Were the instructions clear enough? Please answer on a 5-point scale", widget=widgets.RadioSelect, choices=[1,2,3,4,5]) serv_9 = models.LongStringField(blank=True) serv_10 = models.LongStringField(blank=True) def role(self): if self.id_in_group == 1: return 'Player 1' if self.id_in_group == 2: return 'Player 2' if self.id_in_group == 3: return 'Player 3'