from otree.api import * c = cu doc = '' class C(BaseConstants): NAME_IN_URL = 'Survey' PLAYERS_PER_GROUP = None NUM_ROUNDS = 15 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): NC_taste = models.IntegerField(choices=[[1, '1: Very likely'], [2, '2: Unlikely'], [3, '3: Not sure'], [4, '4: Likely'], [5, '5: Very likely']], label='Admitting that your tastes are different from those of your friends. ', widget=widgets.RadioSelectHorizontal) NC_argue = models.IntegerField(choices=[[1, '1: Very unlikely'], [2, '2: Unlikely'], [3, '3: Not sure'], [4, '4: Likely'], [5, '5: Very likely']], label='Arguing with a friend who has a very different opinion on an issue. ', widget=widgets.RadioSelectHorizontal) NC_speak = models.IntegerField(choices=[[1, '1: Very unlikely'], [2, '2: Unlikely'], [3, '3: Not sure '], [4, '4: Likely'], [5, '5: Very likely']], label='Speaking your mind about an unpopular issue at a social occasion.\u2028', widget=widgets.RadioSelectHorizontal) Altruism_help = models.IntegerField(choices=[[1, '1: Strongly disagree'], [2, '2: Disagree a little'], [3, '3: Neither agree nor disagree'], [4, '4: Agree a little'], [5, '5: Strongly agree']], label='People should be willing to help others who are less fortunate. ', widget=widgets.RadioSelectHorizontal) Altruism_assist = models.IntegerField(choices=[[1, '1. Strongly disagree'], [2, '2. Disagree a little'], [3, '3. Neither agree nor disagree'], [4, '4. Agree a little '], [5, '5. Strongly agree']], label='People should be willing to help others who are less fortunate. ', widget=widgets.RadioSelectHorizontal) Altruism_worry = models.IntegerField(choices=[[5, '1: Strongly disagree'], [4, '2: Disagree a little'], [3, '3: Neither agree nor disagree'], [2, '4: Agree a little'], [1, '5: Strongly agree']], label='These days people need to look after themselves and not overly worry about others', widget=widgets.RadioSelectHorizontal) Agreeableness = models.IntegerField(choices=[[1, '1: Disagree strongly'], [2, '2: Disagree a little'], [3, '3: Neither agree nor disagree'], [4, '4: Agree a little'], [5, '5: Agree strongly']], label='', widget=widgets.RadioSelectHorizontal) BIS_1 = models.IntegerField(choices=[[1, '1'], [2, '2'], [3, '3'], [4, '4']], label='I plan tasks carefully.', widget=widgets.RadioSelectHorizontal) BIS_2 = models.IntegerField(choices=[[1, '1'], [2, '2'], [3, '3'], [4, '4']], label='I do things without thinking.', widget=widgets.RadioSelectHorizontal) BIS_3 = models.IntegerField(choices=[[1, '1'], [2, '2'], [3, '3'], [4, '4']], label='I make-up my mind quickly.', widget=widgets.RadioSelectHorizontal) BIS_4 = models.IntegerField(choices=[[1, '1'], [2, '2'], [3, '3'], [4, '4']], label='I am happy-go-lucky. ', widget=widgets.RadioSelectHorizontal) BIS_5 = models.IntegerField(choices=[[1, '1'], [2, '2'], [3, '3'], [4, '4']], label='I don’t "pay attention".', widget=widgets.RadioSelectHorizontal) BIS_6 = models.IntegerField(choices=[[1, '1'], [2, '2'], [3, '3'], [4, '4']], label='I have “racing” thoughts.', widget=widgets.RadioSelectHorizontal) BIS_7 = models.IntegerField(choices=[[1, '1'], [2, '2'], [3, '3'], [4, '4']], label='I plan trips well ahead of time.', widget=widgets.RadioSelectHorizontal) BIS_8 = models.IntegerField(choices=[[1, '1'], [2, '2'], [3, '3'], [4, '4']], label='I am self-controlled.', widget=widgets.RadioSelectHorizontal) BIS_9 = models.IntegerField(choices=[[1, '1'], [2, '2'], [3, '3'], [4, '4']], label='I concentrate easily.', widget=widgets.RadioSelectHorizontal) BIS_10 = models.IntegerField(choices=[[1, '1'], [2, '2'], [3, '3'], [4, '4']], label='I save regularly.', widget=widgets.RadioSelectHorizontal) BIS_11 = models.IntegerField(choices=[[1, '1'], [2, '2'], [3, '3'], [4, '4']], label='I “squirm” at plays or lectures.', widget=widgets.RadioSelectHorizontal) BIS_12 = models.IntegerField(choices=[[1, '1'], [2, '2'], [3, '3'], [4, '4']], label='I am a careful thinker.', widget=widgets.RadioSelectHorizontal) BIS_13 = models.IntegerField(choices=[[1, '1'], [2, '2'], [3, '3'], [4, '4']], label='I plan for job security. ', widget=widgets.RadioSelectHorizontal) BIS_14 = models.IntegerField(choices=[[1, '1'], [2, '2'], [3, '3'], [4, '4']], label='I say things without thinking.', widget=widgets.RadioSelectHorizontal) BIS_15 = models.IntegerField(choices=[[1, '1'], [2, '2'], [3, '3'], [4, '4']], label='I like to think about complex problems.', widget=widgets.RadioSelectHorizontal) BIS_16 = models.IntegerField(choices=[[1, '1'], [2, '2'], [3, '3'], [4, '4']], label='I change jobs. ', widget=widgets.RadioSelectHorizontal) BIS_17 = models.FloatField(choices=[[1, '1'], [2, '2'], [3, '3'], [4, '4']], label='I act “on impulse”.', widget=widgets.RadioSelectHorizontal) BIS_18 = models.IntegerField(choices=[[1, '1'], [2, '2'], [3, '3'], [4, '4']], label='I get easily bored when solving thought problems.', widget=widgets.RadioSelectHorizontal) BIS_19 = models.IntegerField(choices=[[1, '1'], [2, '2'], [3, '3'], [4, '4']], label='I act on the spur of the moment. ', widget=widgets.RadioSelectHorizontal) BIS_20 = models.IntegerField(choices=[[1, '1'], [2, '2'], [3, '3'], [4, '4']], label='I am a steady thinker.', widget=widgets.RadioSelectHorizontal) BIS_21 = models.IntegerField(choices=[[1, '1'], [2, '2'], [3, '3'], [4, '4']], label='I change residences.', widget=widgets.RadioSelectHorizontal) BIS_22 = models.IntegerField(choices=[[1, '1'], [2, '2'], [3, '3'], [4, '4']], label='I buy things on impulse.', widget=widgets.RadioSelectHorizontal) class BIS(Page): form_model = 'player' form_fields = ['BIS_1', 'BIS_2', 'BIS_3', 'BIS_4', 'BIS_5', 'BIS_6', 'BIS_7', 'BIS_8', 'BIS_9', 'BIS_10', 'BIS_11', 'BIS_12', 'BIS_13', 'BIS_14', 'BIS_15', 'BIS_16', 'BIS_17', 'BIS_18', 'BIS_19', 'BIS_20', 'BIS_21', 'BIS_22'] class Altruism(Page): form_model = 'player' form_fields = ['Altruism_help', 'Altruism_assist', 'Altruism_worry'] class NonConformity(Page): form_model = 'player' form_fields = ['NC_taste', 'NC_argue', 'NC_speak'] class Payment_Investment(Page): form_model = 'player' @staticmethod def vars_for_template(player: Player): participant = player.participant combined_allrounds = [] for i in range(10): round_info = ( participant.round_number_allrounds[i], participant.investor_payoff_allrounds[i], participant.has_volunteer_allrounds[i], participant.is_volunteer_allrounds[i], participant.payoff_allrounds[i] ) combined_allrounds.append(round_info) return {'combined_allrounds': combined_allrounds} page_sequence = [BIS, Altruism, NonConformity, Payment_Investment]