import random from otree.api import * doc = """ Your app description """ class Subsession(BaseSubsession): pass class Constants(BaseConstants): FORM_TEMPLATE = __name__ + '/form.html' name_in_url = 'Experiment' players_per_group = None endowment = 10 blue_bonus = 0.05 yellow_bonus = 0.10 tasks = ['Konow', 'Earn', 'PGG', 'VG', 'PD', 'Pareto', 'SH'] num_rounds = len(tasks) + 1 questions = ['Konow_A1', 'Konow_A2', 'Konow_A3', 'Konow_A4', 'Konow_A5', 'Konow_A6', 'Konow_A7', 'Konow_A8', 'Konow_A9', 'Konow_A10', 'Konow_A11', 'EarnD_1', 'EarnD_2', 'EarnD_3', 'EarnD_4', 'EarnD_5', 'EarnD_6', 'EarnD_7', 'EarnD_8', 'EarnD_9', 'EarnD_10', 'EarnD_11', 'PE_0', 'PE_2', 'PE_4', 'PE_6', 'PE_8', 'PE_10', 'VG3_0', 'VG3_2', 'VG3_4', 'VG3_6', 'VG3_8', 'VG3_10', 'PD1_C', 'PD1_D', 'Pareto1_A', 'Pareto1_B', 'SH1_S', 'SH1_H', 'Konow_B1', 'Konow_B2', 'Konow_B3', 'Konow_B4', 'Konow_B5', 'Konow_B6', 'Konow_B7', 'Konow_B8', 'Konow_B9', 'Konow_B10', 'Konow_B11', 'EarnR_1', 'EarnR_2', 'EarnR_3', 'EarnR_4', 'EarnR_5', 'EarnR_6', 'EarnR_7', 'EarnR_8', 'EarnR_9', 'EarnR_10', 'EarnR_11', 'PI_0', 'PI_2', 'PI_4', 'PI_6', 'PI_8', 'PI_10', 'VG16_0', 'VG16_2', 'VG16_4', 'VG16_6', 'VG16_8', 'VG16_10', 'PD2_C', 'PD2_D', 'Pareto2_A', 'Pareto2_B', 'SH2_S', 'SH2_H', ] class Group(BaseGroup): random = models.FloatField() class Player(BasePlayer): consent = models.IntegerField(widget=widgets.RadioSelect, label="", choices=[[0, 'Consent and Proceed'], [1, 'Leave this survey']]) konow = models.FloatField() earn = models.FloatField() pgg = models.FloatField() vg = models.FloatField() pd = models.FloatField() pareto = models.FloatField() sh = models.FloatField() RFT_balls_in_blue = models.IntegerField(min=0, max=20) RFT_balls_in_yellow = models.IntegerField(min=0, max=20) round_to_pay = models.IntegerField() treatment = models.StringField() payoff_norms = models.CurrencyField() payoff_rule = models.CurrencyField() payoff_total = models.CurrencyField() donation = models.CurrencyField(min=0, max=1000, label="") risk = models.IntegerField(choices=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], widget=widgets.RadioSelectHorizontal, label="Please use a scale from 0 to 10 where 0 means you are “completely " "unwilling to take risks” and a 10 means you are “very willing " "to take risks”. " "You can also use the values in-between to indicate where you fall on the scale.") altruistic = models.IntegerField(choices=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], widget=widgets.RadioSelectHorizontal, label=" Please use a scale from 0 to 10, where 0 means you are “completely " "unwilling to share” and a 10 means you are “very willing to share”. " "You can also use the values in-between to indicate where you fall " "on the scale.") rules = models.IntegerField(choices=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], widget=widgets.RadioSelectHorizontal, label=" Please use a scale from 0 to 10, where 0 means you are “completely " "unwilling to follow rules” and a 10 means you are “very willing to follow " "rules”. You can also use the values in-between to indicate where you fall " "on the scale.") # This is for main choices, each variable is one row in the choice table MPL Pareto1_A = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) Pareto1_B = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) Pareto2_A = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) Pareto2_B = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) SH1_S = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) SH1_H = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) SH2_S = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) SH2_H = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) PD1_C = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) PD1_D = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) PD2_C = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) PD2_D = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) PE_0 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) PE_2 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) PE_4 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) PE_6 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) PE_8 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) PE_10 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) PI_0 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) PI_2 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) PI_4 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) PI_6 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) PI_8 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) PI_10 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) VG3_0 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) VG3_2 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) VG3_4 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) VG3_6 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) VG3_8 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) VG3_10 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) VG16_0 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) VG16_2 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) VG16_4 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) VG16_6 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) VG16_8 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) VG16_10 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) EarnR_1 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) EarnR_2 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) EarnR_3 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) EarnR_4 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) EarnR_5 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) EarnR_6 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) EarnR_7 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) EarnR_8 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) EarnR_9 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) EarnR_10 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) EarnR_11 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) Q1 = models.PositiveIntegerField(choices=[[1, '

Très Socialement Inapproprié

'], [2, '

Socialement Inapproprié

'], [3, '

Plutôt Socialement Inapproprié

'], [4, '

Plutôt Socialement Approprié

'], [5, '

Socialement Approprié

'], [6, '

Très Socialement Approprié

']], widget=widgets.RadioSelectHorizontal) Q2 = models.PositiveIntegerField(choices=[[1, '

Très Socialement Inapproprié

'], [2, '

Socialement Inapproprié

'], [3, '

Plutôt Socialement Inapproprié

'], [4, '

Plutôt Socialement Approprié

'], [5, '

Socialement Approprié

'], [6, '

Très Socialement Approprié

']], widget=widgets.RadioSelectHorizontal) Q3 = models.PositiveIntegerField(choices=[[1, '

Très Socialement Inapproprié

'], [2, '

Socialement Inapproprié

'], [3, '

Plutôt Socialement Inapproprié

'], [4, '

Plutôt Socialement Approprié

'], [5, '

Socialement Approprié

'], [6, '

Très Socialement Approprié

']], widget=widgets.RadioSelectHorizontal) Q4 = models.PositiveIntegerField(choices=[[1, '

Très Socialement Inapproprié

'], [2, '

Socialement Inapproprié

'], [3, '

Plutôt Socialement Inapproprié

'], [4, '

Plutôt Socialement Approprié

'], [5, '

Socialement Approprié

'], [6, '

Très Socialement Approprié

']], widget=widgets.RadioSelectHorizontal) EarnD_1 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) EarnD_2 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) EarnD_3 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) EarnD_4 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) EarnD_5 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) EarnD_6 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) EarnD_7 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) EarnD_8 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) EarnD_9 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) EarnD_10 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) EarnD_11 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) Konow_A1 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) Konow_A2 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) Konow_A3 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) Konow_A4 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) Konow_A5 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) Konow_A6 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) Konow_A7 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) Konow_A8 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) Konow_A9 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) Konow_A10 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) Konow_A11 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) Konow_B1 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) Konow_B2 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) Konow_B3 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) Konow_B4 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) Konow_B5 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) Konow_B6 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) Konow_B7 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) Konow_B8 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) Konow_B9 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) Konow_B10 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) Konow_B11 = models.PositiveIntegerField(choices=[[1, '

Very Socially Inappropriate

'], [2, '

Socially Inappropriate

'], [3, '

Rather Socially Inappropriate

'], [4, '

Rather Socially Appropriate

'], [5, '

Socially Appropriate

'], [6, '

Very Socially Appropriate

']], widget=widgets.RadioSelectHorizontal) Q_1 = models.PositiveIntegerField(choices=[[1, '

Very Inappropriate

'], [2, '

Inappropriate

'], [3, '

Rather Inappropriate

'], [4, '

Rather Appropriate

'], [5, '

Appropriate

'], [6, '

Very Appropriate

']], widget=widgets.RadioSelectHorizontal) MoralA1 = models.PositiveIntegerField(choices=[[1, '

Strongly disagree

'], [2, '

Disagree

'], [3, '

Somewhat disagree

'], [4, '

Neither agree nor disagree

'], [5, '

Somewhat agree

'], [6, '

Agree

'], [7, '

Strongly agree

']], widget=widgets.RadioSelectHorizontal) MoralA2 = models.PositiveIntegerField(choices=[[1, '

Strongly disagree

'], [2, '

Disagree

'], [3, '

Somewhat disagree

'], [4, '

Neither agree nor disagree

'], [5, '

Somewhat agree

'], [6, '

Agree

'], [7, '

Strongly agree

']], widget=widgets.RadioSelectHorizontal) MoralA3 = models.PositiveIntegerField(choices=[[1, '

Strongly disagree

'], [2, '

Disagree

'], [3, '

Somewhat disagree

'], [4, '

Neither agree nor disagree

'], [5, '

Somewhat agree

'], [6, '

Agree

'], [7, '

Strongly agree

']], widget=widgets.RadioSelectHorizontal) MoralA4 = models.PositiveIntegerField(choices=[[1, '

Strongly disagree

'], [2, '

Disagree

'], [3, '

Somewhat disagree

'], [4, '

Neither agree nor disagree

'], [5, '

Somewhat agree

'], [6, '

Agree

'], [7, '

Strongly agree

']], widget=widgets.RadioSelectHorizontal) MoralA5 = models.PositiveIntegerField(choices=[[1, '

Strongly disagree

'], [2, '

Disagree

'], [3, '

Somewhat disagree

'], [4, '

Neither agree nor disagree

'], [5, '

Somewhat agree

'], [6, '

Agree

'], [7, '

Strongly agree

']], widget=widgets.RadioSelectHorizontal) MoralA6 = models.PositiveIntegerField(choices=[[1, '

Strongly disagree

'], [2, '

Disagree

'], [3, '

Somewhat disagree

'], [4, '

Neither agree nor disagree

'], [5, '

Somewhat agree

'], [6, '

Agree

'], [7, '

Strongly agree

']], widget=widgets.RadioSelectHorizontal) MoralA7 = models.PositiveIntegerField(choices=[[1, '

Strongly disagree

'], [2, '

Disagree

'], [3, '

Somewhat disagree

'], [4, '

Neither agree nor disagree

'], [5, '

Somewhat agree

'], [6, '

Agree

'], [7, '

Strongly agree

']], widget=widgets.RadioSelectHorizontal) MoralA8 = models.PositiveIntegerField(choices=[[1, '

Strongly disagree

'], [2, '

Disagree

'], [3, '

Somewhat disagree

'], [4, '

Neither agree nor disagree

'], [5, '

Somewhat agree

'], [6, '

Agree

'], [7, '

Strongly agree

']], widget=widgets.RadioSelectHorizontal) MoralA9 = models.PositiveIntegerField(choices=[[1, '

Strongly disagree

'], [2, '

Disagree

'], [3, '

Somewhat disagree

'], [4, '

Neither agree nor disagree

'], [5, '

Somewhat agree

'], [6, '

Agree

'], [7, '

Strongly agree

']], widget=widgets.RadioSelectHorizontal) Moral_A1 = models.PositiveIntegerField(choices=[[1, '

Strongly disagree

'], [2, '

Disagree

'], [3, '

Somewhat disagree

'], [4, '

Neither agree nor disagree

'], [5, '

Somewhat agree

'], [6, '

Agree

'], [7, '

Strongly agree

']], widget=widgets.RadioSelectHorizontal) Moral_A2 = models.PositiveIntegerField(choices=[[1, '

Strongly disagree

'], [2, '

Disagree

'], [3, '

Somewhat disagree

'], [4, '

Neither agree nor disagree

'], [5, '

Somewhat agree

'], [6, '

Agree

'], [7, '

Strongly agree

']], widget=widgets.RadioSelectHorizontal) Moral_A3 = models.PositiveIntegerField(choices=[[1, '

Strongly disagree

'], [2, '

Disagree

'], [3, '

Somewhat disagree

'], [4, '

Neither agree nor disagree

'], [5, '

Somewhat agree

'], [6, '

Agree

'], [7, '

Strongly agree

']], widget=widgets.RadioSelectHorizontal) Moral_A4 = models.PositiveIntegerField(choices=[[1, '

Strongly disagree

'], [2, '

Disagree

'], [3, '

Somewhat disagree

'], [4, '

Neither agree nor disagree

'], [5, '

Somewhat agree

'], [6, '

Agree

'], [7, '

Strongly agree

']], widget=widgets.RadioSelectHorizontal) Moral_A5 = models.PositiveIntegerField(choices=[[1, '

Strongly disagree

'], [2, '

Disagree

'], [3, '

Somewhat disagree

'], [4, '

Neither agree nor disagree

'], [5, '

Somewhat agree

'], [6, '

Agree

'], [7, '

Strongly agree

']], widget=widgets.RadioSelectHorizontal) Moral_B1 = models.PositiveIntegerField(choices=[[1, '

Strongly disagree

'], [2, '

Disagree

'], [3, '

Somewhat disagree

'], [4, '

Neither agree nor disagree

'], [5, '

Somewhat agree

'], [6, '

Agree

'], [7, '

Strongly agree

']], widget=widgets.RadioSelectHorizontal) Moral_B2 = models.PositiveIntegerField(choices=[[1, '

Strongly disagree

'], [2, '

Disagree

'], [3, '

Somewhat disagree

'], [4, '

Neither agree nor disagree

'], [5, '

Somewhat agree

'], [6, '

Agree

'], [7, '

Strongly agree

']], widget=widgets.RadioSelectHorizontal) Moral_B3 = models.PositiveIntegerField(choices=[[1, '

Strongly disagree

'], [2, '

Disagree

'], [3, '

Somewhat disagree

'], [4, '

Neither agree nor disagree

'], [5, '

Somewhat agree

'], [6, '

Agree

'], [7, '

Strongly agree

']], widget=widgets.RadioSelectHorizontal) Moral_B4 = models.PositiveIntegerField(choices=[[1, '

Strongly disagree

'], [2, '

Disagree

'], [3, '

Somewhat disagree

'], [4, '

Neither agree nor disagree

'], [5, '

Somewhat agree

'], [6, '

Agree

'], [7, '

Strongly agree

']], widget=widgets.RadioSelectHorizontal) Moral_B5 = models.PositiveIntegerField(choices=[[1, '

Strongly disagree

'], [2, '

Disagree

'], [3, '

Somewhat disagree

'], [4, '

Neither agree nor disagree

'], [5, '

Somewhat agree

'], [6, '

Agree

'], [7, '

Strongly agree

']], widget=widgets.RadioSelectHorizontal) EarnD1 = models.PositiveIntegerField(choices=[[1, 'Both Person A and Person B completed a ' 'task that lasted 30 minutes.'], [2, 'Person A completed a task that lasted 30 minutes. Person A ' 'divides the amount earned by Person A. '], [3, 'Person B completed a task that lasted 30 minutes. Person' ' A divides the amount earned by Person B.']], label="Which of the following statements is correct regarding " "the described situation?", widget=widgets.RadioSelect) EarnD2 = models.PositiveIntegerField(choices=[[1, 'Person A earns 7€ and Person B earns 13€.'], [2, 'Person A earns 17€ and Person B earns 3€. '], [3, 'Person A earns 7€ and Person B earns 3€.']], label="How much does Person A and Person B earn, if Person A gives 3€ to Person B? ", widget=widgets.RadioSelect) EarnD3 = models.PositiveIntegerField(choices=[[1, 'Person A earns 3€ and Person B earns 7€. '], [2, 'Person A earns 13€ and Person B earns 7€.'], [3, 'Person A earns 3€ and Person B earns 17€.']], label="How much does Person A and Person B earn, if Person A gives 7€ to Person B? ", widget=widgets.RadioSelect) EarnR1 = models.PositiveIntegerField(choices=[[1, 'Both Person A and Person B completed a task that lasted' ' 30 minutes.'], [2, 'Person A completed a task that lasted 30 minutes. Person A ' 'divides the amount earned by Person A.'], [3, 'Person B completed a task that lasted 30 minutes. Person' ' A divides the amount earned by Person B. ']], label="Which of the following statements is correct regarding the " "described situation?", widget=widgets.RadioSelect) EarnR2 = models.PositiveIntegerField(choices=[[1, 'Person A earns 13€ and Person B earns 7€.'], [2, 'Person A earns 7€ and Person B earns 13€.'], [3, 'Person A earns 7€ and Person B earns 3€.']], label="How much does Person A and Person B earn, if Person A gives 3€ to Person B? ", widget=widgets.RadioSelect) EarnR3 = models.PositiveIntegerField(choices=[[1, 'Person A earns 3€ and Person B earns 7€.'], [2, 'Person A earns 13€ and Person B earns 7€.'], [3, 'Person A earns 3€ and Person B earns 17€.']], label="How much does Person A and Person B earn, if Person A gives 7€ to Person B? ", widget=widgets.RadioSelect) KonowA1 = models.PositiveIntegerField(choices=[[1, 'Person A completed a task that lasted 30 minutes. Person A divides the money that Person A earned between Person A and Person B.'], [2, 'Person A and Person B completed a task that lasted 30 minutes. Person A divides the money that Person B earned between Person A and Person B.'], [3, 'Person A and Person B completed a task that lasted 30 minutes. Person A divides the money that Person A and Person B earned between Person A and Person B.' ]], label="Which of the following statements is correct regarding the " "described situation?", widget=widgets.RadioSelect) KonowA2 = models.PositiveIntegerField(choices=[[1, 'In the first stage, Person A earned more money than Person B because Person A answered correctly more tables.'], [2, 'In the first stage, Person A earned more money than Person B because Person A was randomly assigned to a larger payment per correct answer than Person B.'], [3, 'In the first stage, Person A earned more money than Person B because Person B answered correctly more tables.']], label="After the first stage, Person A has earned 8€ and Person B has earned 2€. Which of the following statements is correct regarding the " "described situation?", widget=widgets.RadioSelect) KonowB1 = models.PositiveIntegerField(choices=[[1, 'Person A completed a task that lasted 30 minutes. Person A divides the money that Person A earned between Person A and Person B.'], [2, 'Person A and Person B completed a task that lasted 30 minutes. Person A divides the money that Person B earned between Person A and Person B.'], [3, 'Person A and Person B completed a task that lasted 30 minutes. Person A divides the money that Person A and Person B earned between Person A and Person B.' ]], label="Which of the following statements is correct regarding the " "described situation?", widget=widgets.RadioSelect) KonowB2 = models.PositiveIntegerField(choices=[[1, 'In the first stage, Person A earned more money than Person B because Person A answered correctly more tables.'], [2, 'In the first stage, Person A earned more money than Person B because Person A was randomly assigned to a larger payment per correct answer than Person B.'], [3, 'In the first stage, Person A earned more money than Person B because Person B answered correctly more tables.']], label="After the first stage, Person A has earned 8€ and Person B has earned 2€. Which of the following statements is correct regarding the " "described situation?", widget=widgets.RadioSelect) SH1_01 = models.PositiveIntegerField(choices=[[1, 'Person A earns 10€.'], [2, 'Person A earns 10€ if Person B chooses action B1, and 3€ if Person B chooses action B2.'], [3, 'Person A earns 10€ if Person B chooses action B1, and 0€ if Person B chooses action B2.']], label="How much money does Person A earn if he/she chooses action A1?", widget=widgets.RadioSelect) SH1_02 = models.PositiveIntegerField(choices=[[1, 'Person A earns 3€.'], [2, 'Person A earns 0€ if Person B chooses action B1, and 3€ if Person B chooses action B2.'], [3, 'Person A earns 3€ if Person B chooses action B1, and 0€ if Person B chooses action B2.']], label="How much money does Person A earn if he/she chooses action A2?", widget=widgets.RadioSelect) SH2_01 = models.PositiveIntegerField(choices=[[1, 'Person A earns 5€.'], [2, 'Person A earns 5€ if Person B chooses action B1, and 3€ if Person B chooses action B2.'], [3, 'Person A earns 5€ if Person B chooses action B1, and 0€ if Person B chooses action B2.']], label="How much money does Person A earn if he/she chooses action A1?", widget=widgets.RadioSelect) SH2_02 = models.PositiveIntegerField(choices=[[1, 'Person A earns 3€.'], [2, 'Person A earns 0€ if Person B chooses action B1, and 3€ if Person B chooses action B2.'], [3, 'Person A earns 3€ if Person B chooses action B1, and 0€ if Person B chooses action B2.']], label="How much money does Person A earn if he/she chooses action A2?", widget=widgets.RadioSelect) PGGE1 = models.PositiveIntegerField(choices=[[1, 'We can compute the total earnings of Person A only knowing his/her decision.'], [2, 'The earnings of Person A are the sum of the money he/she placed in Project 1 and the money he/she placed in Project 2.'], [3, 'Each individual makes his decision without knowing the decisions of other group members.']], label="Which of the following statements is correct regarding the " "described situation?", widget=widgets.RadioSelect) PGGE2 = models.PositiveIntegerField(choices=[[1, '11€. (5€ x 1) = 5€ from Project 1 and (5€ x 1.20) = 6€ from Project 2.'], [2, '10€. (5€ x 1) = 5€ from Project 1 and (5€ x 1) = 5€ from Project 2.'], [3, '9€. (5€ x 1) = 5€ from Project 1 and (5€ x 0.80) = 4€ from Project 2.']], label="How much money is generated in total if Person A places 5€ to Project 1 and 5€ to Project 2.", widget=widgets.RadioSelect) PGGI1 = models.PositiveIntegerField(choices=[[1, 'We can compute the total earnings of Person A only knowing his/her decision.'], [2, 'The earnings of Person A are the sum of the money he/she placed in Project 1 and the money he/she placed in Project 2.'], [3, 'Each individual makes his decision without knowing the decisions of other group members.']], label="Which of the following statements is correct regarding the " "described situation?", widget=widgets.RadioSelect) PGGI2 = models.PositiveIntegerField(choices=[[1, '11€. (5€ x 1) = 5€ from Project 1 and (5€ x 1.20) = 6€ from Project 2.'], [2, '10€. (5€ x 1) = 5€ from Project 1 and (5€ x 1) = 5€ from Project 2.'], [3, '9€. (5€ x 1) = 5€ from Project 1 and (5€ x 0.80) = 4€ from Project 2.']], label="How much money is generated in total if Person A places 5€ to Project 1 and 5€ to Project 2.", widget=widgets.RadioSelect) VG3_01 = models.PositiveIntegerField(choices=[[1, '3 participants.'], [2, '2 participants.'], [3, 'This informationis not provided in the instructions.']], label="In the described situation, the group is composed of how many participants in total?", widget=widgets.RadioSelect) VG3_02 = models.PositiveIntegerField(choices=[[1, '10€'], [2, '5€'], [3, 'To answer this question, it is necessary to know' ' the actions selected by other group members.']], label="How much does Person A earn if he/she selects action X?", widget=widgets.RadioSelect) VG3_03 = models.PositiveIntegerField(choices=[[1, '10€'], [2, '5€'], [3, 'To answer this question, it is necessary to know' ' the actions selected by other group members.']], label="How much does Person A earn if he/she selects action Y?", widget=widgets.RadioSelect) VG16_01 = models.PositiveIntegerField(choices=[[1, '16 participants.'], [2, '15 participants.'], [3, 'This information is not provided in the instructions.']], label="In the described situation, the group is composed of how many participants in total?", widget=widgets.RadioSelect) VG16_02 = models.PositiveIntegerField(choices=[[1, '10€'], [2, '5€'], [3, 'To answer this question, it is necessary to know' ' the actions selected by other group members.']], label="How much does Person A earn if he/she selects action X?", widget=widgets.RadioSelect) VG16_03 = models.PositiveIntegerField(choices=[[1, '10€'], [2, '5€'], [3, 'To answer this question, it is necessary to know' ' the actions selected by other group members.']], label="How much does Person A earn if he/she selects action Y?", widget=widgets.RadioSelect) PD1_01 = models.PositiveIntegerField(choices=[[1, 'Person A earns 7€.'], [2, 'Person A earns 7€ if Person B chooses action B1, and 12€ if Person B chooses action B2.'], [3, 'Person A earns 7€ if Person B chooses action B1, and 0€ if Person B chooses action B2.']], label="How much money does Person A earn if he/she chooses action A1?", widget=widgets.RadioSelect) PD1_02 = models.PositiveIntegerField(choices=[[1, 'Person A earns 4€.'], [2, 'Person A earns 12€ if Person B chooses action B1, and 4€ if Person B chooses action B2.'], [3, 'Person A earns 0€ if Person B chooses action B1, and 4€ if Person B chooses action B2.']], label="How much money does Person A earn if he/she chooses action A2?", widget=widgets.RadioSelect) PD2_01 = models.PositiveIntegerField(choices=[[1, 'Person A earns 7€.'], [2, 'Person A earns 7€ if Person B chooses action B1, and 12€ if Person B chooses action B2.'], [3, 'Person A earns 7€ if Person B chooses action B1, and 3€ if Person B chooses action B2.']], label="How much money does Person A earn if he/she chooses action A1?", widget=widgets.RadioSelect) PD2_02 = models.PositiveIntegerField(choices=[[1, 'Person A earns 4€.'], [2, 'Person A earns 12€ if Person B chooses action B1, and 4€ if Person B chooses action B2.'], [3, 'Person A earns 3€ if Person B chooses action B1, and 4€ if Person B chooses action B2.']], label="How much money does Person A earn if he/she chooses action A2?", widget=widgets.RadioSelect) Pareto1_01 = models.PositiveIntegerField(choices=[[1, 'Person A earns 5€.'], [2, 'Person A earns 5€ if Person B chooses action B1, and 0€ if Person B chooses action B2.'], [3, 'Person A earns 0€ if Person B chooses action B1, and 1€ if Person B chooses action B2.']], label="How much money does Person A earn if he/she chooses action A1?", widget=widgets.RadioSelect) Pareto1_02 = models.PositiveIntegerField(choices=[[1, 'Person A earns 1€.'], [2, 'Person A earns 5€ if Person B chooses action B1, and 0€ if Person B chooses action B2.'], [3, 'Person A earns 0€ if Person B chooses action B1, and 1€ if Person B chooses action B2.']], label="How much money does Person A earn if he/she chooses action A2?", widget=widgets.RadioSelect) Pareto2_01 = models.PositiveIntegerField(choices=[[1, 'Person A earns 3€.'], [2, 'Person A earns 3€ if Person B chooses action B1, and 0€ if Person B chooses action B2.'], [3, 'Person A earns 0€ if Person B chooses action B1, and 1€ if Person B chooses action B2.']], label="How much money does Person A earn if he/she chooses action A1?", widget=widgets.RadioSelect) Pareto2_02 = models.PositiveIntegerField(choices=[[1, 'Person A earns 1€.'], [2, 'Person A earns 3€ if Person B chooses action B1, and 0€ if Person B chooses action B2.'], [3, 'Person A earns 0€ if Person B chooses action B1, and 1€ if Person B chooses action B2.']], label="How much money does Person A earn if he/she chooses action A2?", widget=widgets.RadioSelect) # These variables are collected in the final questionnaire Gender = models.StringField(widget=widgets.RadioSelectHorizontal(), choices=['Male', 'Female', 'Prefer not to answer']) age = models.IntegerField(choices=range(18, 60, 1)) Study = models.TextField(label="What are your current field and level of studies ? (Example : Law M1). In case you " "are not" " currently studying, what are your last studies ?") Nationality = models.TextField(label="What is your nationality? (Example : French)") # FUNCTIONS def creating_session(subsession: Subsession): responses = dict() numberround = dict() for i in Constants.questions: responses[i] = {'Very Inappropriate': 0, 'Inappropriate': 0, 'Rather Inappropriate': 0, 'Rather Appropriate': 0, 'Appropriate': 0, 'Very Appropriate': 0} numberround[i] = {1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 7: 0, 8: 0} subsession.session.vars['responses'] = responses subjects = len(subsession.get_players()) konow_list = [0]*subjects earn_list = [0]*subjects pgg_list = [0]*subjects vg_list = [0]*subjects pd_list = [0]*subjects sh_list = [0]*subjects pareto_list = [0]*subjects if subjects % 2 == 0: j = 0 while j < subjects/2: konow_list[j] += 1 earn_list[j] += 1 pgg_list[j] += 1 vg_list[j] += 1 pd_list[j] += 1 sh_list[j] += 1 pareto_list[j] += 1 j += 1 else: k1 = 0 k2 = 0 k3 = 0 k4 = 0 k5 = 0 k6 = 0 k7 = 0 konowr = random.choice([0, 1]) earnr = random.choice([0, 1]) pggr = random.choice([0, 1]) vgr = random.choice([0, 1]) pdr = random.choice([0, 1]) shr = random.choice([0, 1]) paretor = random.choice([0, 1]) while k1 < subjects/2 - konowr: konow_list[k1] += 1 k1 += 1 while k2 < subjects/2 - earnr: earn_list[k2] += 1 k2 += 1 while k3 < subjects/2 - pggr: pgg_list[k3] += 1 k3 += 1 while k4 < subjects/2 - vgr: vg_list[k4] += 1 k4 += 1 while k5 < subjects/2 - pdr: pd_list[k5] += 1 k5 += 1 while k6 < subjects/2 - shr: sh_list[k6] += 1 k6 += 1 while k7 < subjects/2 - paretor: pareto_list[k7] += 1 k7 += 1 random.shuffle(konow_list) random.shuffle(earn_list) random.shuffle(pgg_list) random.shuffle(vg_list) random.shuffle(pd_list) random.shuffle(sh_list) random.shuffle(pareto_list) for player in subsession.get_players(): if subsession.round_number == 1: player.roundtopay = random.randint(1, len(Constants.questions) - 40) player.RFT_balls_in_blue = 0 player.RFT_balls_in_yellow = 0 player.participant.vars['answers'] = responses t1 = Constants.tasks.copy() random.shuffle(t1) round_numbers = list(range(1, Constants.num_rounds + 1)) player.participant.vars['task_rounds'] = dict(zip(t1, round_numbers)) player.payoff_norms = 0 player.payoff_rule = 0 player.payoff_total = 0 player.participant.vars['round'] = numberround player.participant.vars['roundtopay'] = player.roundtopay player.participant.vars['consent1'] = 2 if konow_list[player.id_in_group - 1] == 1: player.participant.vars['konow'] = 1 player.konow = 1 else: player.participant.vars['konow'] = 0 player.konow = 0 if earn_list[player.id_in_group - 1] == 1: player.participant.vars['earn'] = 1 player.earn = 1 else: player.participant.vars['earn'] = 0 player.earn = 0 if pgg_list[player.id_in_group - 1] == 1: player.participant.vars['pgg'] = 1 player.pgg = 1 else: player.participant.vars['pgg'] = 0 player.pgg = 0 if vg_list[player.id_in_group - 1] == 1: player.participant.vars['vg'] = 1 player.vg = 1 else: player.participant.vars['vg'] = 0 player.vg = 0 if pd_list[player.id_in_group - 1] == 1: player.participant.vars['pd'] = 1 player.pd = 1 else: player.participant.vars['pd'] = 0 player.pd = 0 if pareto_list[player.id_in_group - 1] == 1: player.participant.vars['pareto'] = 1 player.pareto = 1 else: player.participant.vars['pareto'] = 0 player.pareto = 0 if sh_list[player.id_in_group - 1] == 1: player.participant.vars['sh'] = 1 player.sh = 1 else: player.participant.vars['sh'] = 0 player.sh = 0 player.vector = [] def set_payoffs(group: Group): players = group.get_players() for p in players: if p.participant.vars['consent1'] != 0: p.participant.vars['RFT_balls_in_blue'] = 0 p.participant.vars['RFT_balls_in_yellow'] = 0 else: p.participant.vars['RFT_balls_in_blue'] = p.RFT_balls_in_blue p.participant.vars['RFT_balls_in_yellow'] = p.RFT_balls_in_yellow p.participant.vars['RFT_profit'] = p.payoff p.payoff_rule = p.RFT_balls_in_blue * Constants.blue_bonus + p.RFT_balls_in_yellow * Constants.yellow_bonus if p.participant.vars['roundtopay'] <= 11: # p.times_selected = dict[p.participant.vars['task_rounds']['Konow']] if p.participant.vars['konow'] >= 0.5: p.round_to_pay = p.participant.vars['roundtopay'] else: p.round_to_pay = p.participant.vars['roundtopay'] + 40 elif 11 < p.participant.vars['roundtopay'] <= 22: # p.times_selected = dict[p.participant.vars['task_rounds']['Earn']] if p.participant.vars['earn'] >= 0.5: p.round_to_pay = p.participant.vars['roundtopay'] else: p.round_to_pay = p.participant.vars['roundtopay'] + 40 elif 22 < p.participant.vars['roundtopay'] <= 28: # p.times_selected = dict[p.participant.vars['task_rounds']['PGG']] if p.participant.vars['pgg'] >= 0.5: p.round_to_pay = p.participant.vars['roundtopay'] else: p.round_to_pay = p.participant.vars['roundtopay'] + 40 elif 28 < p.participant.vars['roundtopay'] <= 34: # p.times_selected = dict[p.participant.vars['task_rounds']['VG']] if p.participant.vars['vg'] >= 0.5: p.round_to_pay = p.participant.vars['roundtopay'] else: p.round_to_pay = p.participant.vars['roundtopay'] + 40 elif 34 < p.participant.vars['roundtopay'] <= 36: # p.times_selected = dict[p.participant.vars['task_rounds']['PD']] if p.participant.vars['pd'] >= 0.5: p.round_to_pay = p.participant.vars['roundtopay'] else: p.round_to_pay = p.participant.vars['roundtopay'] + 40 elif 36 < p.participant.vars['roundtopay'] <= 38: # p.times_selected = dict[p.participant.vars['task_rounds']['Pareto']] if p.participant.vars['pareto'] >= 0.5: p.round_to_pay = p.participant.vars['roundtopay'] else: p.round_to_pay = p.participant.vars['roundtopay'] + 40 else: # p.times_selected = dict[p.participant.vars['task_rounds']['SH']] if p.participant.vars['sh'] >= 0.5: p.round_to_pay = p.participant.vars['roundtopay'] else: p.round_to_pay = p.participant.vars['roundtopay'] + 40 vector = [] p.participant.vars['session_in_winner'] = keys_with_top_values(group.subsession.session.vars['responses'][Constants.questions[p.round_to_pay - 1]]) p.participant.vars['participant_in_winner'] = keys_with_top_values(p.participant.vars['answers'][Constants.questions[p.round_to_pay - 1]]) for m in p.participant.vars['session_in_winner']: if m == 'Very Inappropriate': vector.append(1) else: if m == 'Inappropriate': vector.append(2) else: if m == 'Rather Inappropriate': vector.append(3) else: if m == 'Rather Appropriate': vector.append(4) else: if m == 'Appropriate': vector.append(5) else: vector.append(6) if len(p.participant.vars['session_in_winner']) == 1 and p.participant.vars['session_in_winner'] == p.participant.vars['participant_in_winner']: p.payoff_norms = 7 else: p.payoff_norms = 0 p.payoff = p.payoff_norms + p.payoff_rule p.payoff_total = p.payoff_norms + p.payoff_rule + 5 def keys_with_top_values(my_dict): return [key for (key, value) in my_dict.items() if value == max(my_dict.values())] def key_with_top_values_int(d): key = 0 for k, v in d.items(): if v > 0: key = k return int(key) def my_function(subsession): for g in subsession.get_groups(): set_payoffs(g) def get_quiz_dataSH1(): return [ dict( name='SH1_01', solution=3, explanation="The selected answer is incorrect. The correct answer is “Person A earns 10€ if Person B chooses action B1, and 0€ if Person B chooses action B2”. Note that the earnings of both individuals depend on the actions selected by both Person A and Person B." " The earnings in all possible cases are specified in the instructions above. If Person A selects action A1 and Person B selects action B1, then Person A and Person B earn 10€ each. If Person A selects action A1 and Person B selects action B2, then Person A earns 0€ and Person B earns 3€.", ), dict( name='SH1_02', solution=1, explanation="The selected answer is incorrect. The correct answer is “Person A earns 3€”. Note that the earnings of both individuals depend on the actions selected by both Person A and Person B." " The earnings in all possible cases are specified in the instructions above. If Person A selects action A2 and Person B selects action B1, then Person A earns 3€ and Person B earns 0€. If Person A selects action A2 and Person B selects action B2, then Person A and Person B earn 3€ each. Then, Person A earns 3€ regardless of Person B selected action.", ), ] def get_quiz_data1(): return [ dict( name='Q1', solution=3, explanation="balbbaba", ), ] def get_quiz_dataSH2(): return [ dict( name='SH2_01', solution=3, explanation="The selected answer is incorrect. The correct answer is “Person A earns 5€ if Person B chooses action B1, and 0€ if Person B chooses action B2”. Note that the earnings of both individuals depend on the actions selected by both Person A and Person B." " The earnings in all possible cases are specified in the instructions above. If Person A selects action A1 and Person B selects action B1, then Person A and Person B earn 5€ each. If Person A selects action A1 and Person B selects action B2, then Person A earns 0€ and Person B earns 3€. ", ), dict( name='SH2_02', solution=1, explanation="The selected answer is incorrect. The correct answer is “Person A earns 3€”. Note that the earnings of both individuals depend on the actions selected by both Person A and Person B." " The earnings in all possible cases are specified in the instructions above. If Person A selects action A2 and Person B selects action B1, then Person A earns 3€ and Person B earns 0€. If Person A selects action A2 and Person B selects action B2, then Person A and Person B earn 3€ each. Then, Person A earns 3€ regardless of Person B selected action.", ), ] def get_quiz_dataPGGE(): return [ dict( name='PGGE1', solution=3, explanation="The selected answer is incorrect. The correct answer is “'Each individual makes his decision without knowing the decisions of other group members.'. Note that decisions are taken simultaneously, which means that all group members make their decision at the same time. Therefore, they do not know the decision of others when making their decision. ", ), dict( name='PGGE2', solution=1, explanation="The selected answer is incorrect. The correct answer is “'11€. (5€ x 1) = 5€ from Project 1 and (5€ x 1.20) = 6€ from Project 2.'”. Note that each 1€ placed by an individual in the Project 2 generates a total cash return of 1.20€. Then, the 5€ that Person A places to Project 2 give a total return of (5€ x 1.20) = 6€. On the other hand, the 5€ that Person A places to Project 1 give a total return of 5€. Then, the overall total return is 5€" " + 6€ = 11€.", ), ] def get_quiz_dataPGGI(): return [ dict( name='PGGI1', solution=3, explanation="The selected answer is incorrect. The correct answer is “'Each individual makes his decision without knowing the decisions of other group members.'. Note that decisions are taken simultaneously, which means that all group members make their decision at the same time. Therefore, they do not know the decision of others when making their decision. ", ), dict( name='PGGI2', solution=3, explanation="The selected answer is incorrect. The correct answer is “'9€. (5€ x 1) = 5€ from Project 1 and (5€ x 0.80) = 4€ from Project 2.'”. Note that each 1€ placed by an individual in the Project 2 generates a total cash return of 0.80€. Then, the 5€ that Person A places to Project 2 give a total return of (5€ x 0.80) = 4€. On the other hand, the 5€ that Person A places to Project 1 give a total return of 5€. Then, the overall total return is 4€" " + 5€ = 9€.", ), ] def get_quiz_dataVG3(): return [ dict( name='VG3_01', solution=1, explanation="The selected answer is incorrect. The correct answer is “3 participants”. Recall that Person A is randomly placed in a group with 2 other participants. Then, the total size of the group is 2 participants + 1 participant (Person A) = 3 participants. ",), dict( name='VG3_02', solution=2, explanation="The selected answer is incorrect. The correct answer is “5€”. Individuals " "that choose X earn 5€ regardless of the actions selected by other individuals. " "If Person A selects X, Person A, and all the individuals that selected X, " "obtain 5€. On the other hand, all the individuals that selected Y obtain 10€.", ), dict( name='VG3_03', solution=3, explanation="The selected answer is incorrect. The correct answer is “To answer" " this question, it is necessary to know the actions selected by" " other group members”. If Person A selects Y, Person A obtain " "10€ if at least one individual of the group selects X, and 0€ otherwise.", ), ] def get_quiz_dataVG16(): return [ dict( name='VG16_01', solution=1, explanation="The selected answer is incorrect. The correct answer is “16 participants”. Recall that Person A is randomly placed in a group with 15 other participants. Then, the total size of the group is 15 participants + 1 participant (Person A) = 16 participants. ", ), dict( name='VG16_02', solution=2, explanation="The selected answer is incorrect. The correct answer is “5€”. Individuals " "that choose X earn 5€ regardless of the actions selected by other individuals. " "If Person A selects X, Person A, and all the individuals that selected X, " "obtain 5€. On the other hand, all the individuals that selected Y obtain 10€.", ), dict( name='VG16_03', solution=3, explanation="The selected answer is incorrect. The correct answer is “To answer" " this question, it is necessary to know the actions selected by" " other group members”. If Person A selects Y, Person A obtain " "10€ if at least one individual of the group selects X, and 0€ otherwise.", ), ] def get_quiz_dataPD1(): return [ dict( name='PD1_01', solution=3, explanation="The selected answer is incorrect. The correct answer is 'Person A earns 7€ if Person B chooses action B1, and 0€ if Person B chooses action B2'. Note that the earnings of both individuals depend on the actions selected by both Person A and Person B." " The earnings in all possible cases are specified in the instructions above. If Person A selects action A1 and Person B selects action B1, then Person A and Person B earn 7€ each. If Person A selects action A1 and Person B selects action B2, then Person A earns 0€ and Person B earns 12€.", ), dict( name='PD1_02', solution=2, explanation="The selected answer is incorrect. The correct answer is 'Person A earns 12€ if Person B chooses action B1, and 4€ if Person B chooses action B2'. Note that the earnings of both individuals depend on the actions selected by both Person A and Person B." " The earnings in all possible cases are specified in the instructions above. If Person A selects action A2 and Person B selects action B1, then Person A earns 12€ and Person B earns 0€. If Person A selects action A2 and Person B selects action B2, then Person A and Person B earn 4€ each.", ), ] def get_quiz_dataPD2(): return [ dict( name='PD2_01', solution=3, explanation="The selected answer is incorrect. The correct answer is 'Person A earns 7€ if Person B chooses action B1, and 3€ if Person B chooses action B2.'. Note that the earnings of both individuals depend on the actions selected by both Person A and Person B. " " The earnings in all possible cases are specified in the instructions above. If Person A selects action A1 and Person B selects action B1, then Person A and Person B earn 7€ each. If Person A selects action A1 and Person B selects action B2, then Person A earns 3€ and Person B earns 12€.", ), dict( name='PD2_02', solution=2, explanation="The selected answer is incorrect. The correct answer is 'Person A earns 12€ if Person B chooses action B1, and 4€ if Person B chooses action B2.'. Note that the earnings of both individuals depend on the actions selected by both Person A and Person B. " " The earnings in all possible cases are specified in the instructions above. If Person A selects action A2 and Person B selects action B1, then Person A earns 12€ and Person B earns 3€. If Person A selects action A2 and Person B selects action B2, then Person A and Person B earn 4€ each.", ), ] def get_quiz_dataPareto1(): return [ dict( name='Pareto1_01', solution=2, explanation="The selected answer is incorrect. The correct answer is 'Person A earns 5€ if Person B chooses action B1, and 0€ if Person B chooses action B2'. Note that the earnings of both individuals depend on the actions selected by both Person A and Person B." " The earnings in all possible cases are specified in the instructions above. If Person A selects action A1 and Person B selects action B1, then Person A and Person B earn 5€ each. If Person A selects action A1 and Person B selects action B2, then Person A and Person B earn 0€ each. ", ), dict( name='Pareto1_02', solution=3, explanation="The selected answer is incorrect. The correct answer is 'Person A earns 0€ if Person B chooses action B1, and 1€ if Person B chooses action B2'. Note that the earnings of both individuals depend on the actions selected by both Person A and Person B." " The earnings in all possible cases are specified in the instructions above. If Person A selects action A2 and Person B selects action B1, then Person A and Person B earn 0€ each. If Person A selects action A2 and Person B selects action B2, then Person A and Person B earn 1€ each.", ), ] def get_quiz_dataPareto2(): return [ dict( name='Pareto2_01', solution=2, explanation="The selected answer is incorrect. The correct answer is 'Person A earns 3€ if Person B chooses action B1, and 0€ if Person B chooses action B2'. Note that the earnings of both individuals depend on the actions selected by both Person A and Person B." "The earnings in all possible cases are specified in the instructions above. If Person A selects action A1 and Person B selects action B1, then Person A and Person B earn 3€ each. If Person A selects action A1 and Person B selects action B2, then Person A and Person B earn 0€ each.", ), dict( name='Pareto2_02', solution=3, explanation="The selected answer is incorrect. The correct answer is 'Person A earns 0€ if Person B chooses action B1, and 1€ if Person B chooses action B2'. Note that the earnings of both individuals depend on the actions selected by both Person A and Person B." "The earnings in all possible cases are specified in the instructions above. If Person A selects action A2 and Person B selects action B1, then Person A and Person B earn 0€ each. IIf Person A selects action A2 and Person B selects action B2, then Person A and Person B earn 1€ each.", ), ] def get_quiz_dataKonowA(): return [ dict( name='KonowA1', solution=3, explanation="The selected answer is incorrect. The correct answer is 'Person A and Person B completed a task that lasted 30 minutes. Person A divides the money that Person A and Person B earned between Person A and Person B.”" "Note that both Person A and Person B participated in the task. Then, Person A divides the money earned by both individuals.", ), dict( name='KonowA2', solution=2, explanation="The selected answer is incorrect. The correct answer is 'In the first stage, Person A earned more money than Person B because Person A was randomly assigned to a larger payment per correct answer than Person B.”" " Both Person A and Person B have answered correctly 20 tables. Then, the only difference in the amount earned was than Person A was assigned to a larger payment per correct answer than Person B. " ), ] def get_quiz_dataKonowB(): return [ dict( name='KonowB1', solution=3, explanation="The selected answer is incorrect. The correct answer is 'Person A and Person B completed a task that lasted 30 minutes. Person A divides the money that Person A and Person B earned between Person A and Person B.”" "Note that both Person A and Person B participated in the task. Then, Person A divides the money earned by both individuals.", ), dict( name='KonowB2', solution=1, explanation="The selected answer is incorrect. The correct answer is 'In the first stage, Person A earned more money than Person B because Person A answered correctly more tables.”" "Note that Person A has answered correctly 32 tables while Person B has answered correctly 8 tables. Both individuals are assigned to the same payment per correct answer.", ), ] def get_quiz_dataEarnR(): return [ dict( name='EarnR1', solution=3, explanation="The selected answer is incorrect. The correct answer is “Person B completed a task that lasted 30 minutes." " Person A divides the amount earned by Person B.”. Person B earns 10€ by participating in a " "task that has lasted 30 minutes. Person A did not have the opportunity to earn any money. Then, Person A divides the 10€ earned by Person B between himself/herself and Person B.", ), dict( name='EarnR2', solution=3, explanation="The selected answer is incorrect. The correct answer is “Person A earns 7€ and Person B earns 3€”. Recall that Person A divides the 10€ earned by Person B. Therefore, if Person A gives 3€ to Person B, Person A earns (10 - 3) = 7€ and Person B earns 3€.", ), dict( name='EarnR3', solution=1, explanation="The selected answer is incorrect. The correct answer is “Person A earns 3€ and Person B earns 7€”. Recall that Person A divides the 10€ earned by Person B. Therefore, if Person A gives 7€ to Person B, Person A earns (10 - 7) = 3€ and Person B earns 7€. ", ) ] def get_quiz_dataEarnD(): return [ dict( name='EarnD1', solution=2, explanation="The selected answer is incorrect. The correct answer is “Person A completed a task that lasted" " 30 minutes. Person A divides the amount earned by Person A.”. Person A earns 10€ by participating in a task that" " has lasted 30 minutes. Person B did not have the opportunity to earn " "any money. Then, Person A divides the 10€ he/she earned between himself/herself and Person B.", ), dict( name='EarnD2', solution=3, explanation="The selected answer is incorrect. The correct answer is “Person A earns 7€ and Person B earns 3€”. Recall that Person A divides the 10€ earned by Person A. Therefore, if Person A gives 3€ to Person B, Person A earns (10 - 3) = 7€ and Person B earns 3€.", ), dict( name='EarnD3', solution=1, explanation="The selected answer is incorrect. The correct answer is “Person A earns 3€ and Person B earns 7€”. Recall that Person A divides the 10€ earned by Person A. Therefore, if Person A gives 7€ to Person B, Person A earns (10 - 7) = 3€ and Person B earns 7€. ", ) ] # PAGES class TestInstructions(Page): form_model = 'player' @staticmethod def is_displayed(player: Player): participant = player.participant return player.round_number == 1 and player.participant.vars['consent1'] == 0 class ElicitationNormsEarnR(Page): # which forms are needed from class player form_model = 'player' form_fields = ['EarnR_1', 'EarnR_2', 'EarnR_3', 'EarnR_4', 'EarnR_5', 'EarnR_6', 'EarnR_7', 'EarnR_8', 'EarnR_9', 'EarnR_10', 'EarnR_11'] list = form_fields @staticmethod def is_displayed(player: Player): participant = player.participant return player.participant.vars['earn'] < 0.5 and player.round_number == player.participant.vars['task_rounds'][ 'Earn'] and player.participant.vars['consent1'] == 0 def before_next_page(player: Player, timeout_happened): for i in ElicitationNormsEarnR.list: player.participant.vars['round'][i][player.round_number] = player.participant.vars['round'][i][ player.round_number] + 1 if eval('player.' + i) == 1: player.session.vars['responses'][i]['Very Inappropriate'] = \ player.session.vars['responses'][i]['Very Inappropriate'] + 1 player.participant.vars['answers'][i]['Very Inappropriate'] = \ player.participant.vars['answers'][i]['Very Inappropriate'] + 1 elif eval('player.' + i) == 2: player.session.vars['responses'][i]['Inappropriate'] = \ player.session.vars['responses'][i]['Inappropriate'] + 1 player.participant.vars['answers'][i]['Inappropriate'] = \ player.participant.vars['answers'][i]['Inappropriate'] + 1 elif eval('player.' + i) == 3: player.session.vars['responses'][i]['Rather Inappropriate'] = \ player.session.vars['responses'][i]['Rather Inappropriate'] + 1 player.participant.vars['answers'][i]['Rather Inappropriate'] = \ player.participant.vars['answers'][i]['Rather Inappropriate'] + 1 elif eval('player.' + i) == 4: player.session.vars['responses'][i]['Rather Appropriate'] = \ player.session.vars['responses'][i]['Rather Appropriate'] + 1 player.participant.vars['answers'][i]['Rather Appropriate'] = \ player.participant.vars['answers'][i]['Rather Appropriate'] + 1 elif eval('player.' + i) == 5: player.session.vars['responses'][i]['Appropriate'] = \ player.session.vars['responses'][i]['Appropriate'] + 1 player.participant.vars['answers'][i]['Appropriate'] = \ player.participant.vars['answers'][i]['Appropriate'] + 1 else: player.session.vars['responses'][i]['Very Appropriate'] = \ player.session.vars['responses'][i]['Very Appropriate'] + 1 player.participant.vars['answers'][i]['Very Appropriate'] = \ player.participant.vars['answers'][i]['Very Appropriate'] + 1 class ElicitationNormsEarnD(Page): # which forms are needed from class player form_model = 'player' form_fields = ['EarnD_1', 'EarnD_2', 'EarnD_3', 'EarnD_4', 'EarnD_5', 'EarnD_6', 'EarnD_7', 'EarnD_8', 'EarnD_9', 'EarnD_10', 'EarnD_11'] list = form_fields @staticmethod def is_displayed(player: Player): participant = player.participant return player.participant.vars['earn'] >= 0.5 and player.round_number == player.participant.vars['task_rounds'][ 'Earn'] and player.participant.vars['consent1'] == 0 def before_next_page(player: Player, timeout_happened): for i in ElicitationNormsEarnD.list: player.participant.vars['round'][i][player.round_number] = player.participant.vars['round'][i][ player.round_number] + 1 if eval('player.' + i) == 1: player.session.vars['responses'][i]['Very Inappropriate'] = \ player.session.vars['responses'][i]['Very Inappropriate'] + 1 player.participant.vars['answers'][i]['Very Inappropriate'] = \ player.participant.vars['answers'][i]['Very Inappropriate'] + 1 elif eval('player.' + i) == 2: player.session.vars['responses'][i]['Inappropriate'] = \ player.session.vars['responses'][i]['Inappropriate'] + 1 player.participant.vars['answers'][i]['Inappropriate'] = \ player.participant.vars['answers'][i]['Inappropriate'] + 1 elif eval('player.' + i) == 3: player.session.vars['responses'][i]['Rather Inappropriate'] = \ player.session.vars['responses'][i]['Rather Inappropriate'] + 1 player.participant.vars['answers'][i]['Rather Inappropriate'] = \ player.participant.vars['answers'][i]['Rather Inappropriate'] + 1 elif eval('player.' + i) == 4: player.session.vars['responses'][i]['Rather Appropriate'] = \ player.session.vars['responses'][i]['Rather Appropriate'] + 1 player.participant.vars['answers'][i]['Rather Appropriate'] = \ player.participant.vars['answers'][i]['Rather Appropriate'] + 1 elif eval('player.' + i) == 5: player.session.vars['responses'][i]['Appropriate'] = \ player.session.vars['responses'][i]['Appropriate'] + 1 player.participant.vars['answers'][i]['Appropriate'] = \ player.participant.vars['answers'][i]['Appropriate'] + 1 else: player.session.vars['responses'][i]['Very Appropriate'] = \ player.session.vars['responses'][i]['Very Appropriate'] + 1 player.participant.vars['answers'][i]['Very Appropriate'] = \ player.participant.vars['answers'][i]['Very Appropriate'] + 1 class Instructions1(Page): # which forms are needed from class player form_model = 'player' @staticmethod def is_displayed(player: Player): participant = player.participant return player.round_number == 1 and player.participant.vars['consent1'] == 0 class ConsentForm(Page): # which forms are needed from class player form_model = 'player' form_fields = ['consent'] @staticmethod def is_displayed(player: Player): participant = player.participant return player.round_number == 1 def before_next_page(player, timeout_happened): player.participant.vars['consent1'] = player.consent class GeneralInstructionsExperiment(Page): # which forms are needed from class player form_model = 'player' @staticmethod def is_displayed(player: Player): participant = player.participant return player.round_number == 1 and player.participant.vars['consent1'] == 0 class ExampleSituation(Page): # which forms are needed from class player form_model = 'player' @staticmethod def is_displayed(player: Player): participant = player.participant return player.round_number == 1 and player.participant.vars['consent1'] == 0 class SituationDescriptionEarnR(Page): # which forms are needed from class player form_model = 'player' @staticmethod def is_displayed(player: Player): participant = player.participant return player.participant.vars['earn'] < 0.5 and player.participant.vars['task_rounds']['Earn'] and \ player.participant.vars['consent1'] == 0 class SituationDescriptionEarnD(Page): # which forms are needed from class player form_model = 'player' @staticmethod def is_displayed(player: Player): participant = player.participant return player.participant.vars['earn'] >= 0.5 and player.round_number == player.participant.vars['task_rounds'][ 'Earn'] and player.participant.vars['consent1'] == 0 class InstructionsExperiment(Page): form_model = 'player' @staticmethod def is_displayed(player: Player): participant = player.participant return player.round_number == 1 and player.participant.vars['consent1'] == 0 class QuestionnaireIntro(Page): # forms to retrieve individual information form_model = 'player' @staticmethod def is_displayed(player: Player): participant = player.participant return player.round_number == Constants.num_rounds and player.participant.vars['consent1'] == 0 class QuestionnaireAltruism1(Page): # forms to retrieve individual information form_model = 'player' form_fields = ['donation'] @staticmethod def is_displayed(player: Player): participant = player.participant return player.round_number == Constants.num_rounds and player.participant.vars['consent1'] == 0 class QuestionnaireAltruism2(Page): # forms to retrieve individual information form_model = 'player' form_fields = ['altruistic'] @staticmethod def is_displayed(player: Player): participant = player.participant return player.round_number == Constants.num_rounds and player.participant.vars['consent1'] == 0 class QuestionnaireRisk(Page): # forms to retrieve individual information form_model = 'player' form_fields = ['risk'] @staticmethod def is_displayed(player: Player): participant = player.participant return player.round_number == Constants.num_rounds and player.participant.vars['consent1'] == 0 class QuestionnairePersonal(Page): # forms to retrieve individual information form_model = 'player' form_fields = ['age', 'Gender', 'Nationality', 'Study'] @staticmethod def is_displayed(player: Player): participant = player.participant return player.round_number == Constants.num_rounds and player.participant.vars['consent1'] == 0 class QuestionnaireRules(Page): # forms to retrieve individual information form_model = 'player' form_fields = ['rules'] @staticmethod def is_displayed(player: Player): participant = player.participant return player.round_number == Constants.num_rounds and player.participant.vars['consent1'] == 0 class Page2(Page): # forms to retrieve individual information form_model = 'player' @staticmethod def is_displayed(player: Player): participant = player.participant return player.round_number == Constants.num_rounds and player.participant.vars['consent1'] == 0 class Page3(Page): # forms to retrieve individual information form_model = 'player' form_fields = ['RFT_balls_in_blue', 'RFT_balls_in_yellow'] @staticmethod def is_displayed(player: Player): participant = player.participant return player.round_number == Constants.num_rounds and player.participant.vars['consent1'] == 0 class ResultsWaitPage(WaitPage): template_name = 'New_Social_Norms/MyWaitPage.html' wait_for_all_groups = True after_all_players_arrive = my_function @staticmethod def is_displayed(player: Player): participant = player.participant return player.round_number == Constants.num_rounds and player.participant.vars['consent1'] == 0 class Results(Page): form_model = 'player' @staticmethod def is_displayed(player: Player): participant = player.participant return player.round_number == Constants.num_rounds and player.participant.vars['consent1'] == 0 def vars_for_template(player: Player): if player.id_in_group == 1: return dict(question_to_pay1 = Constants.questions[player.round_to_pay-1], payment=player.round_to_pay, session=player.session.vars['responses'], winner=player.participant.vars['participant_in_winner'], answersession=player.participant.vars['session_in_winner'], roundparticipant=player.participant.vars['answers'] ) if player.id_in_group == 2: return dict(question_to_pay2 = Constants.questions[player.round_to_pay-1], payment2=player.round_to_pay, winner2=player.participant.vars['participant_in_winner'], answersession2=player.participant.vars['session_in_winner'], roundparticipant2=player.participant.vars['answers'] ) if player.id_in_group == 3: return dict(question_to_pay3= Constants.questions[player.round_to_pay-1], payment3=player.round_to_pay, winner3=player.participant.vars['participant_in_winner'], answersession3=player.participant.vars['session_in_winner'], roundparticipant3=player.participant.vars['answers'] ) if player.id_in_group == 4: return dict(question_to_pay4 = Constants.questions[player.round_to_pay-1], payment4=player.round_to_pay, winner4=player.participant.vars['participant_in_winner'], answersession4=player.participant.vars['session_in_winner'], roundparticipant4=player.participant.vars['answers'] ) if player.id_in_group == 5: return dict(question_to_pay5=Constants.questions[player.round_to_pay-1], payment5=player.round_to_pay, winner5=player.participant.vars['participant_in_winner'], answersession5=player.participant.vars['session_in_winner'], roundparticipant5=player.participant.vars['answers'] ) if player.id_in_group == 6: return dict(question_to_pay6=Constants.questions[player.round_to_pay-1], payment6=player.round_to_pay, winner6=player.participant.vars['participant_in_winner'], answersession6=player.participant.vars['session_in_winner'], roundparticipant6=player.participant.vars['answers'] ) if player.id_in_group == 7: return dict(question_to_pay7=Constants.questions[player.round_to_pay-1], payment7=player.round_to_pay, winner7=player.participant.vars['participant_in_winner'], answersession7=player.participant.vars['session_in_winner'], roundparticipant7=player.participant.vars['answers'] ) if player.id_in_group == 8: return dict(question_to_pay8=Constants.questions[player.round_to_pay-1], payment8=player.round_to_pay, winner8=player.participant.vars['participant_in_winner'], answersession8=player.participant.vars['session_in_winner'], roundparticipant8=player.participant.vars['answers'] ) class IntructionsTask2(Page): form_model = 'player' @staticmethod def is_displayed(player: Player): participant = player.participant return player.round_number == 1 and player.participant.vars['consent1'] == 0 class IntructionsComprehension(Page): # which forms are needed from class player form_model = 'player' form_fields = ['Q1'] list = form_fields @staticmethod def is_displayed(player: Player): participant = player.participant return player.round_number == 1 and player.participant.vars['consent1'] == 0 class InstructionsNormsEarnR(Page): # which forms are needed from class player form_model = 'player' form_fields = ['EarnR1', 'EarnR2', 'EarnR3'] list = form_fields @staticmethod def is_displayed(player: Player): participant = player.participant return player.participant.vars['earn'] < 0.5 and player.round_number == player.participant.vars['task_rounds'][ 'Earn'] and player.participant.vars['consent1'] == 0 class InstructionsNormsEarnD(Page): # which forms are needed from class player form_model = 'player' form_fields = ['EarnD1', 'EarnD2', 'EarnD3'] list = form_fields @staticmethod def is_displayed(player: Player): participant = player.participant return player.participant.vars['earn'] >= 0.5 and player.round_number == player.participant.vars['task_rounds'][ 'Earn'] and player.participant.vars['consent1'] == 0 class ResultsEarnR(Page): form_model = 'player' form_fields = ['EarnR1', 'EarnR2', 'EarnR3'] @staticmethod def is_displayed(player: Player): participant = player.participant return player.participant.vars['earn'] < 0.5 and player.round_number == player.participant.vars['task_rounds'][ 'Earn'] and player.participant.vars['consent1'] == 0 @staticmethod def vars_for_template(player: Player): fields = get_quiz_dataEarnR() # we add an extra entry 'is_correct' (True/False) to each field for d in fields: d['is_correct'] = getattr(player, d['name']) == d['solution'] return dict(fields=fields, show_solutions=True) class ResultsComprehension(Page): form_model = 'player' form_fields = ['Q1'] @staticmethod def is_displayed(player: Player): participant = player.participant return player.round_number == 1 and player.participant.vars['consent1'] == 0 @staticmethod def vars_for_template(player: Player): fields = get_quiz_data1() # we add an extra entry 'is_correct' (True/False) to each field for d in fields: d['is_correct'] = getattr(player, d['name']) == d['solution'] return dict(fields=fields, show_solutions=True) class Elicit(Page): form_model = 'player' form_fields = ['Q_1'] @staticmethod def is_displayed(player: Player): participant = player.participant return player.round_number == 1 and player.participant.vars['consent1'] == 0 @staticmethod def vars_for_template(player: Player): fields = get_quiz_data1() # we add an extra entry 'is_correct' (True/False) to each field for d in fields: d['is_correct'] = getattr(player, d['name']) == d['solution'] return dict(fields=fields, show_solutions=True) class ResultsEarnD(Page): form_model = 'player' form_fields = ['EarnD1', 'EarnD2', 'EarnD3'] @staticmethod def is_displayed(player: Player): participant = player.participant return player.participant.vars['earn'] >= 0.5 and player.round_number == player.participant.vars['task_rounds'][ 'Earn'] and player.participant.vars['consent1'] == 0 @staticmethod def vars_for_template(player: Player): fields = get_quiz_dataEarnD() # we add an extra entry 'is_correct' (True/False) to each field for d in fields: d['is_correct'] = getattr(player, d['name']) == d['solution'] return dict(fields=fields, show_solutions=True) class InstructionsNormsKonowA(Page): # which forms are needed from class player form_model = 'player' form_fields = ['KonowA1', 'KonowA2'] list = form_fields @staticmethod def is_displayed(player: Player): participant = player.participant return player.participant.vars['konow'] >= 0.5 and player.round_number == \ player.participant.vars['task_rounds']['Konow'] and player.participant.vars['consent1'] == 0 class ResultsKonowA(Page): form_model = 'player' form_fields = ['KonowA1', 'KonowA2'] @staticmethod def is_displayed(player: Player): participant = player.participant return player.participant.vars['konow'] >= 0.5 and player.round_number == \ player.participant.vars['task_rounds']['Konow'] and player.participant.vars['consent1'] == 0 @staticmethod def vars_for_template(player: Player): fields = get_quiz_dataKonowA() # we add an extra entry 'is_correct' (True/False) to each field for d in fields: d['is_correct'] = getattr(player, d['name']) == d['solution'] return dict(fields=fields, show_solutions=True) class ElicitationsNormsKonowA(Page): # which forms are needed from class player form_model = 'player' form_fields = ['Konow_A1', 'Konow_A2', 'Konow_A3', 'Konow_A4', 'Konow_A5', 'Konow_A6', 'Konow_A7', 'Konow_A8', 'Konow_A9', 'Konow_A10', 'Konow_A11'] # all 11 options list = form_fields @staticmethod def is_displayed(player: Player): participant = player.participant return player.participant.vars['konow'] >= 0.5 and player.round_number == \ player.participant.vars['task_rounds']['Konow'] and player.participant.vars['consent1'] == 0 def before_next_page(player: Player, timeout_happened): for i in ElicitationsNormsKonowA.list: player.participant.vars['round'][i][player.round_number] = player.participant.vars['round'][i][ player.round_number] + 1 if eval('player.' + i) == 1: player.session.vars['responses'][i]['Very Inappropriate'] = \ player.session.vars['responses'][i]['Very Inappropriate'] + 1 player.participant.vars['answers'][i]['Very Inappropriate'] = \ player.participant.vars['answers'][i]['Very Inappropriate'] + 1 elif eval('player.' + i) == 2: player.session.vars['responses'][i]['Inappropriate'] = \ player.session.vars['responses'][i]['Inappropriate'] + 1 player.participant.vars['answers'][i]['Inappropriate'] = \ player.participant.vars['answers'][i]['Inappropriate'] + 1 elif eval('player.' + i) == 3: player.session.vars['responses'][i]['Rather Inappropriate'] = \ player.session.vars['responses'][i]['Rather Inappropriate'] + 1 player.participant.vars['answers'][i]['Rather Inappropriate'] = \ player.participant.vars['answers'][i]['Rather Inappropriate'] + 1 elif eval('player.' + i) == 4: player.session.vars['responses'][i]['Rather Appropriate'] = \ player.session.vars['responses'][i]['Rather Appropriate'] + 1 player.participant.vars['answers'][i]['Rather Appropriate'] = \ player.participant.vars['answers'][i]['Rather Appropriate'] + 1 elif eval('player.' + i) == 5: player.session.vars['responses'][i]['Appropriate'] = \ player.session.vars['responses'][i]['Appropriate'] + 1 player.participant.vars['answers'][i]['Appropriate'] = \ player.participant.vars['answers'][i]['Appropriate'] + 1 else: player.session.vars['responses'][i]['Very Appropriate'] = \ player.session.vars['responses'][i]['Very Appropriate'] + 1 player.participant.vars['answers'][i]['Very Appropriate'] = \ player.participant.vars['answers'][i]['Very Appropriate'] + 1 class InstructionsNormsKonowB(Page): # which forms are needed from class player form_model = 'player' form_fields = ['KonowB1', 'KonowB2'] list = form_fields @staticmethod def is_displayed(player: Player): participant = player.participant return player.participant.vars['konow'] < 0.5 and player.round_number == player.participant.vars['task_rounds'][ 'Konow'] and player.participant.vars['consent1'] == 0 class ResultsKonowB(Page): form_model = 'player' form_fields = ['KonowB1', 'KonowB2'] @staticmethod def is_displayed(player: Player): participant = player.participant return player.participant.vars['konow'] < 0.5 and player.round_number == player.participant.vars['task_rounds'][ 'Konow'] and player.participant.vars['consent1'] == 0 @staticmethod def vars_for_template(player: Player): fields = get_quiz_dataKonowB() # we add an extra entry 'is_correct' (True/False) to each field for d in fields: d['is_correct'] = getattr(player, d['name']) == d['solution'] return dict(fields=fields, show_solutions=True) class Picture(Page): # which forms are needed from class player form_model = 'player' form_fields = ['Q1', 'Q2','Q3', 'Q4'] @staticmethod def is_displayed(player: Player): participant = player.participant return player.round_number == 1 class ElicitationsNormsKonowB(Page): # which forms are needed from class player form_model = 'player' form_fields = ['Konow_B1', 'Konow_B2', 'Konow_B3', 'Konow_B4', 'Konow_B5', 'Konow_B6', 'Konow_B7', 'Konow_B8', 'Konow_B9', 'Konow_B10', 'Konow_B11'] # all 11 options list = form_fields @staticmethod def is_displayed(player: Player): participant = player.participant return player.participant.vars['konow'] < 0.5 and player.round_number == player.participant.vars['task_rounds'][ 'Konow'] and player.participant.vars['consent1'] == 0 def before_next_page(player: Player, timeout_happened): for i in ElicitationsNormsKonowB.list: player.participant.vars['round'][i][player.round_number] = player.participant.vars['round'][i][ player.round_number] + 1 if eval('player.' + i) == 1: player.session.vars['responses'][i]['Very Inappropriate'] = \ player.session.vars['responses'][i]['Very Inappropriate'] + 1 player.participant.vars['answers'][i]['Very Inappropriate'] = \ player.participant.vars['answers'][i]['Very Inappropriate'] + 1 elif eval('player.' + i) == 2: player.session.vars['responses'][i]['Inappropriate'] = \ player.session.vars['responses'][i]['Inappropriate'] + 1 player.participant.vars['answers'][i]['Inappropriate'] = \ player.participant.vars['answers'][i]['Inappropriate'] + 1 elif eval('player.' + i) == 3: player.session.vars['responses'][i]['Rather Inappropriate'] = \ player.session.vars['responses'][i]['Rather Inappropriate'] + 1 player.participant.vars['answers'][i]['Rather Inappropriate'] = \ player.participant.vars['answers'][i]['Rather Inappropriate'] + 1 elif eval('player.' + i) == 4: player.session.vars['responses'][i]['Rather Appropriate'] = \ player.session.vars['responses'][i]['Rather Appropriate'] + 1 player.participant.vars['answers'][i]['Rather Appropriate'] = \ player.participant.vars['answers'][i]['Rather Appropriate'] + 1 elif eval('player.' + i) == 5: player.session.vars['responses'][i]['Appropriate'] = \ player.session.vars['responses'][i]['Appropriate'] + 1 player.participant.vars['answers'][i]['Appropriate'] = \ player.participant.vars['answers'][i]['Appropriate'] + 1 else: player.session.vars['responses'][i]['Very Appropriate'] = \ player.session.vars['responses'][i]['Very Appropriate'] + 1 player.participant.vars['answers'][i]['Very Appropriate'] = \ player.participant.vars['answers'][i]['Very Appropriate'] + 1 class InstructionsNormsPGGE(Page): # which forms are needed from class player form_model = 'player' form_fields = ['PGGE1', 'PGGE2'] list = form_fields @staticmethod def is_displayed(player: Player): participant = player.participant return player.participant.vars['pgg'] >= 0.5 and player.round_number == player.participant.vars['task_rounds'][ 'PGG'] and player.participant.vars[ 'consent1'] == 0 class ResultsPGGE(Page): form_model = 'player' form_fields = ['PGGE1', 'PGGE2'] @staticmethod def is_displayed(player: Player): participant = player.participant return player.participant.vars['pgg'] >= 0.5 and player.round_number == player.participant.vars['task_rounds'][ 'PGG'] and player.participant.vars[ 'consent1'] == 0 @staticmethod def vars_for_template(player: Player): fields = get_quiz_dataPGGE() # we add an extra entry 'is_correct' (True/False) to each field for d in fields: d['is_correct'] = getattr(player, d['name']) == d['solution'] return dict(fields=fields, show_solutions=True) class ElicitationNormsPGGE(Page): # which forms are needed from class player form_model = 'player' form_fields = ['PE_0', 'PE_2', 'PE_4', 'PE_6', 'PE_8', 'PE_10'] # all 11 options list = form_fields @staticmethod def is_displayed(player: Player): participant = player.participant return player.participant.vars['pgg'] >= 0.5 and player.round_number == player.participant.vars['task_rounds'][ 'PGG'] and player.participant.vars[ 'consent1'] == 0 def before_next_page(player: Player, timeout_happened): for i in ElicitationNormsPGGE.list: player.participant.vars['round'][i][player.round_number] = player.participant.vars['round'][i][ player.round_number] + 1 if eval('player.' + i) == 1: player.session.vars['responses'][i]['Very Inappropriate'] = \ player.session.vars['responses'][i]['Very Inappropriate'] + 1 player.participant.vars['answers'][i]['Very Inappropriate'] = \ player.participant.vars['answers'][i]['Very Inappropriate'] + 1 elif eval('player.' + i) == 2: player.session.vars['responses'][i]['Inappropriate'] = \ player.session.vars['responses'][i]['Inappropriate'] + 1 player.participant.vars['answers'][i]['Inappropriate'] = \ player.participant.vars['answers'][i]['Inappropriate'] + 1 elif eval('player.' + i) == 3: player.session.vars['responses'][i]['Rather Inappropriate'] = \ player.session.vars['responses'][i]['Rather Inappropriate'] + 1 player.participant.vars['answers'][i]['Rather Inappropriate'] = \ player.participant.vars['answers'][i]['Rather Inappropriate'] + 1 elif eval('player.' + i) == 4: player.session.vars['responses'][i]['Rather Appropriate'] = \ player.session.vars['responses'][i]['Rather Appropriate'] + 1 player.participant.vars['answers'][i]['Rather Appropriate'] = \ player.participant.vars['answers'][i]['Rather Appropriate'] + 1 elif eval('player.' + i) == 5: player.session.vars['responses'][i]['Appropriate'] = \ player.session.vars['responses'][i]['Appropriate'] + 1 player.participant.vars['answers'][i]['Appropriate'] = \ player.participant.vars['answers'][i]['Appropriate'] + 1 else: player.session.vars['responses'][i]['Very Appropriate'] = \ player.session.vars['responses'][i]['Very Appropriate'] + 1 player.participant.vars['answers'][i]['Very Appropriate'] = \ player.participant.vars['answers'][i]['Very Appropriate'] + 1 class InstructionsNormsPGGI(Page): # which forms are needed from class player form_model = 'player' form_fields = ['PGGI1', 'PGGI2'] list = form_fields @staticmethod def is_displayed(player: Player): participant = player.participant return player.participant.vars['pgg'] < 0.5 and player.round_number == player.participant.vars['task_rounds'][ 'PGG'] and player.participant.vars[ 'consent1'] == 0 class ResultsPGGI(Page): form_model = 'player' form_fields = ['PGGI1', 'PGGI2'] @staticmethod def is_displayed(player: Player): participant = player.participant return player.participant.vars['pgg'] < 0.5 and player.round_number == player.participant.vars['task_rounds'][ 'PGG'] and player.participant.vars[ 'consent1'] == 0 @staticmethod def vars_for_template(player: Player): fields = get_quiz_dataPGGI() # we add an extra entry 'is_correct' (True/False) to each field for d in fields: d['is_correct'] = getattr(player, d['name']) == d['solution'] return dict(fields=fields, show_solutions=True) class ElicitationNormsPGGI(Page): # which forms are needed from class player form_model = 'player' form_fields = ['PI_0', 'PI_2', 'PI_4', 'PI_6', 'PI_8', 'PI_10'] # all 11 options list = form_fields @staticmethod def is_displayed(player: Player): participant = player.participant return player.participant.vars['pgg'] < 0.5 and player.round_number == player.participant.vars['task_rounds'][ 'PGG'] and player.participant.vars[ 'consent1'] == 0 def before_next_page(player: Player, timeout_happened): for i in ElicitationNormsPGGI.list: player.participant.vars['round'][i][player.round_number] = player.participant.vars['round'][i][ player.round_number] + 1 if eval('player.' + i) == 1: player.session.vars['responses'][i]['Very Inappropriate'] = \ player.session.vars['responses'][i]['Very Inappropriate'] + 1 player.participant.vars['answers'][i]['Very Inappropriate'] = \ player.participant.vars['answers'][i]['Very Inappropriate'] + 1 elif eval('player.' + i) == 2: player.session.vars['responses'][i]['Inappropriate'] = \ player.session.vars['responses'][i]['Inappropriate'] + 1 player.participant.vars['answers'][i]['Inappropriate'] = \ player.participant.vars['answers'][i]['Inappropriate'] + 1 elif eval('player.' + i) == 3: player.session.vars['responses'][i]['Rather Inappropriate'] = \ player.session.vars['responses'][i]['Rather Inappropriate'] + 1 player.participant.vars['answers'][i]['Rather Inappropriate'] = \ player.participant.vars['answers'][i]['Rather Inappropriate'] + 1 elif eval('player.' + i) == 4: player.session.vars['responses'][i]['Rather Appropriate'] = \ player.session.vars['responses'][i]['Rather Appropriate'] + 1 player.participant.vars['answers'][i]['Rather Appropriate'] = \ player.participant.vars['answers'][i]['Rather Appropriate'] + 1 elif eval('player.' + i) == 5: player.session.vars['responses'][i]['Appropriate'] = \ player.session.vars['responses'][i]['Appropriate'] + 1 player.participant.vars['answers'][i]['Appropriate'] = \ player.participant.vars['answers'][i]['Appropriate'] + 1 else: player.session.vars['responses'][i]['Very Appropriate'] = \ player.session.vars['responses'][i]['Very Appropriate'] + 1 player.participant.vars['answers'][i]['Very Appropriate'] = \ player.participant.vars['answers'][i]['Very Appropriate'] + 1 class InstructionsNormsVG3(Page): # which forms are needed from class player form_model = 'player' form_fields = ['VG3_01', 'VG3_02', 'VG3_03'] list = form_fields @staticmethod def is_displayed(player: Player): participant = player.participant return player.participant.vars['vg'] >= 0.5 and player.round_number == player.participant.vars['task_rounds'][ 'VG'] and player.participant.vars[ 'consent1'] == 0 class ResultsVG3(Page): form_model = 'player' form_fields = ['VG3_01', 'VG3_02', 'VG3_03'] @staticmethod def is_displayed(player: Player): participant = player.participant return player.participant.vars['vg'] >= 0.5 and player.round_number == player.participant.vars['task_rounds'][ 'VG'] and player.participant.vars[ 'consent1'] == 0 @staticmethod def vars_for_template(player: Player): fields = get_quiz_dataVG3() # we add an extra entry 'is_correct' (True/False) to each field for d in fields: d['is_correct'] = getattr(player, d['name']) == d['solution'] return dict(fields=fields, show_solutions=True) class ElicitationNormsVG3(Page): # which forms are needed from class player form_model = 'player' form_fields = ['VG3_0', 'VG3_2', 'VG3_4', 'VG3_6', 'VG3_8', 'VG3_10'] # all 11 options list = form_fields @staticmethod def is_displayed(player: Player): participant = player.participant return player.participant.vars['vg'] >= 0.5 and player.round_number == player.participant.vars['task_rounds'][ 'VG'] and player.participant.vars[ 'consent1'] == 0 def before_next_page(player: Player, timeout_happened): for i in ElicitationNormsVG3.list: player.participant.vars['round'][i][player.round_number] = player.participant.vars['round'][i][ player.round_number] + 1 if eval('player.' + i) == 1: player.session.vars['responses'][i]['Very Inappropriate'] = \ player.session.vars['responses'][i]['Very Inappropriate'] + 1 player.participant.vars['answers'][i]['Very Inappropriate'] = \ player.participant.vars['answers'][i]['Very Inappropriate'] + 1 elif eval('player.' + i) == 2: player.session.vars['responses'][i]['Inappropriate'] = \ player.session.vars['responses'][i]['Inappropriate'] + 1 player.participant.vars['answers'][i]['Inappropriate'] = \ player.participant.vars['answers'][i]['Inappropriate'] + 1 elif eval('player.' + i) == 3: player.session.vars['responses'][i]['Rather Inappropriate'] = \ player.session.vars['responses'][i]['Rather Inappropriate'] + 1 player.participant.vars['answers'][i]['Rather Inappropriate'] = \ player.participant.vars['answers'][i]['Rather Inappropriate'] + 1 elif eval('player.' + i) == 4: player.session.vars['responses'][i]['Rather Appropriate'] = \ player.session.vars['responses'][i]['Rather Appropriate'] + 1 player.participant.vars['answers'][i]['Rather Appropriate'] = \ player.participant.vars['answers'][i]['Rather Appropriate'] + 1 elif eval('player.' + i) == 5: player.session.vars['responses'][i]['Appropriate'] = \ player.session.vars['responses'][i]['Appropriate'] + 1 player.participant.vars['answers'][i]['Appropriate'] = \ player.participant.vars['answers'][i]['Appropriate'] + 1 else: player.session.vars['responses'][i]['Very Appropriate'] = \ player.session.vars['responses'][i]['Very Appropriate'] + 1 player.participant.vars['answers'][i]['Very Appropriate'] = \ player.participant.vars['answers'][i]['Very Appropriate'] + 1 class InstructionsNormsVG16(Page): # which forms are needed from class player form_model = 'player' form_fields = ['VG16_01', 'VG16_02', 'VG16_03'] list = form_fields @staticmethod def is_displayed(player: Player): participant = player.participant return player.participant.vars['vg'] < 0.5 and player.round_number == player.participant.vars['task_rounds'][ 'VG'] and player.participant.vars[ 'consent1'] == 0 class ResultsVG16(Page): form_model = 'player' form_fields = ['VG16_01', 'VG16_02', 'VG16_03'] @staticmethod def is_displayed(player: Player): participant = player.participant return player.participant.vars['vg'] < 0.5 and player.round_number == player.participant.vars['task_rounds'][ 'VG'] and player.participant.vars[ 'consent1'] == 0 @staticmethod def vars_for_template(player: Player): fields = get_quiz_dataVG16() # we add an extra entry 'is_correct' (True/False) to each field for d in fields: d['is_correct'] = getattr(player, d['name']) == d['solution'] return dict(fields=fields, show_solutions=True) class ElicitationNormsVG16(Page): # which forms are needed from class player form_model = 'player' form_fields = ['VG16_0', 'VG16_2', 'VG16_4', 'VG16_6', 'VG16_8', 'VG16_10'] # all 11 options list = form_fields @staticmethod def is_displayed(player: Player): participant = player.participant return player.participant.vars['vg'] < 0.5 and player.round_number == player.participant.vars['task_rounds'][ 'VG'] and player.participant.vars[ 'consent1'] == 0 def before_next_page(player: Player, timeout_happened): for i in ElicitationNormsVG16.list: player.participant.vars['round'][i][player.round_number] = player.participant.vars['round'][i][ player.round_number] + 1 if eval('player.' + i) == 1: player.session.vars['responses'][i]['Very Inappropriate'] = \ player.session.vars['responses'][i]['Very Inappropriate'] + 1 player.participant.vars['answers'][i]['Very Inappropriate'] = \ player.participant.vars['answers'][i]['Very Inappropriate'] + 1 elif eval('player.' + i) == 2: player.session.vars['responses'][i]['Inappropriate'] = \ player.session.vars['responses'][i]['Inappropriate'] + 1 player.participant.vars['answers'][i]['Inappropriate'] = \ player.participant.vars['answers'][i]['Inappropriate'] + 1 elif eval('player.' + i) == 3: player.session.vars['responses'][i]['Rather Inappropriate'] = \ player.session.vars['responses'][i]['Rather Inappropriate'] + 1 player.participant.vars['answers'][i]['Rather Inappropriate'] = \ player.participant.vars['answers'][i]['Rather Inappropriate'] + 1 elif eval('player.' + i) == 4: player.session.vars['responses'][i]['Rather Appropriate'] = \ player.session.vars['responses'][i]['Rather Appropriate'] + 1 player.participant.vars['answers'][i]['Rather Appropriate'] = \ player.participant.vars['answers'][i]['Rather Appropriate'] + 1 elif eval('player.' + i) == 5: player.session.vars['responses'][i]['Appropriate'] = \ player.session.vars['responses'][i]['Appropriate'] + 1 player.participant.vars['answers'][i]['Appropriate'] = \ player.participant.vars['answers'][i]['Appropriate'] + 1 else: player.session.vars['responses'][i]['Very Appropriate'] = \ player.session.vars['responses'][i]['Very Appropriate'] + 1 player.participant.vars['answers'][i]['Very Appropriate'] = \ player.participant.vars['answers'][i]['Very Appropriate'] + 1 class InstructionsNormsPD1(Page): # which forms are needed from class player form_model = 'player' form_fields = ['PD1_01', 'PD1_02'] list = form_fields @staticmethod def is_displayed(player: Player): participant = player.participant return player.participant.vars['pd'] >= 0.5 and player.round_number == player.participant.vars['task_rounds'][ 'PD'] and player.participant.vars[ 'consent1'] == 0 class ResultsPD1(Page): form_model = 'player' form_fields = ['PD1_01', 'PD1_02'] @staticmethod def is_displayed(player: Player): participant = player.participant return player.participant.vars['pd'] >= 0.5 and player.round_number == player.participant.vars['task_rounds'][ 'PD'] and player.participant.vars[ 'consent1'] == 0 @staticmethod def vars_for_template(player: Player): fields = get_quiz_dataPD1() # we add an extra entry 'is_correct' (True/False) to each field for d in fields: d['is_correct'] = getattr(player, d['name']) == d['solution'] return dict(fields=fields, show_solutions=True) class ElicitationNormsPD1(Page): # which forms are needed from class player form_model = 'player' form_fields = ['PD1_C', 'PD1_D'] # all 11 options list = form_fields @staticmethod def is_displayed(player: Player): participant = player.participant return player.participant.vars['pd'] >= 0.5 and player.round_number == player.participant.vars['task_rounds'][ 'PD'] and player.participant.vars[ 'consent1'] == 0 def before_next_page(player: Player, timeout_happened): for i in ElicitationNormsPD1.list: player.participant.vars['round'][i][player.round_number] = player.participant.vars['round'][i][ player.round_number] + 1 if eval('player.' + i) == 1: player.session.vars['responses'][i]['Very Inappropriate'] = \ player.session.vars['responses'][i]['Very Inappropriate'] + 1 player.participant.vars['answers'][i]['Very Inappropriate'] = \ player.participant.vars['answers'][i]['Very Inappropriate'] + 1 elif eval('player.' + i) == 2: player.session.vars['responses'][i]['Inappropriate'] = \ player.session.vars['responses'][i]['Inappropriate'] + 1 player.participant.vars['answers'][i]['Inappropriate'] = \ player.participant.vars['answers'][i]['Inappropriate'] + 1 elif eval('player.' + i) == 3: player.session.vars['responses'][i]['Rather Inappropriate'] = \ player.session.vars['responses'][i]['Rather Inappropriate'] + 1 player.participant.vars['answers'][i]['Rather Inappropriate'] = \ player.participant.vars['answers'][i]['Rather Inappropriate'] + 1 elif eval('player.' + i) == 4: player.session.vars['responses'][i]['Rather Appropriate'] = \ player.session.vars['responses'][i]['Rather Appropriate'] + 1 player.participant.vars['answers'][i]['Rather Appropriate'] = \ player.participant.vars['answers'][i]['Rather Appropriate'] + 1 elif eval('player.' + i) == 5: player.session.vars['responses'][i]['Appropriate'] = \ player.session.vars['responses'][i]['Appropriate'] + 1 player.participant.vars['answers'][i]['Appropriate'] = \ player.participant.vars['answers'][i]['Appropriate'] + 1 else: player.session.vars['responses'][i]['Very Appropriate'] = \ player.session.vars['responses'][i]['Very Appropriate'] + 1 player.participant.vars['answers'][i]['Very Appropriate'] = \ player.participant.vars['answers'][i]['Very Appropriate'] + 1 class InstructionsNormsPD2(Page): # which forms are needed from class player form_model = 'player' form_fields = ['PD2_01', 'PD2_02'] list = form_fields @staticmethod def is_displayed(player: Player): participant = player.participant return player.participant.vars['pd'] < 0.5 and player.round_number == player.participant.vars['task_rounds'][ 'PD'] and player.participant.vars[ 'consent1'] == 0 class ResultsPD2(Page): form_model = 'player' form_fields = ['PD2_01', 'PD2_02'] @staticmethod def is_displayed(player: Player): participant = player.participant return player.participant.vars['pd'] < 0.5 and player.round_number == player.participant.vars['task_rounds'][ 'PD'] and player.participant.vars[ 'consent1'] == 0 @staticmethod def vars_for_template(player: Player): fields = get_quiz_dataPD2() # we add an extra entry 'is_correct' (True/False) to each field for d in fields: d['is_correct'] = getattr(player, d['name']) == d['solution'] return dict(fields=fields, show_solutions=True) class ElicitationNormsPD2(Page): # which forms are needed from class player form_model = 'player' form_fields = ['PD2_C', 'PD2_D'] # all 11 options list = form_fields @staticmethod def is_displayed(player: Player): participant = player.participant return player.participant.vars['pd'] < 0.5 and player.round_number == player.participant.vars['task_rounds'][ 'PD'] and player.participant.vars[ 'consent1'] == 0 def before_next_page(player: Player, timeout_happened): for i in ElicitationNormsPD2.list: player.participant.vars['round'][i][player.round_number] = player.participant.vars['round'][i][ player.round_number] + 1 if eval('player.' + i) == 1: player.session.vars['responses'][i]['Very Inappropriate'] = \ player.session.vars['responses'][i]['Very Inappropriate'] + 1 player.participant.vars['answers'][i]['Very Inappropriate'] = \ player.participant.vars['answers'][i]['Very Inappropriate'] + 1 elif eval('player.' + i) == 2: player.session.vars['responses'][i]['Inappropriate'] = \ player.session.vars['responses'][i]['Inappropriate'] + 1 player.participant.vars['answers'][i]['Inappropriate'] = \ player.participant.vars['answers'][i]['Inappropriate'] + 1 elif eval('player.' + i) == 3: player.session.vars['responses'][i]['Rather Inappropriate'] = \ player.session.vars['responses'][i]['Rather Inappropriate'] + 1 player.participant.vars['answers'][i]['Rather Inappropriate'] = \ player.participant.vars['answers'][i]['Rather Inappropriate'] + 1 elif eval('player.' + i) == 4: player.session.vars['responses'][i]['Rather Appropriate'] = \ player.session.vars['responses'][i]['Rather Appropriate'] + 1 player.participant.vars['answers'][i]['Rather Appropriate'] = \ player.participant.vars['answers'][i]['Rather Appropriate'] + 1 elif eval('player.' + i) == 5: player.session.vars['responses'][i]['Appropriate'] = \ player.session.vars['responses'][i]['Appropriate'] + 1 player.participant.vars['answers'][i]['Appropriate'] = \ player.participant.vars['answers'][i]['Appropriate'] + 1 else: player.session.vars['responses'][i]['Very Appropriate'] = \ player.session.vars['responses'][i]['Very Appropriate'] + 1 player.participant.vars['answers'][i]['Very Appropriate'] = \ player.participant.vars['answers'][i]['Very Appropriate'] + 1 class InstructionsNormsPareto1(Page): # which forms are needed from class player form_model = 'player' form_fields = ['Pareto1_01', 'Pareto1_02'] list = form_fields @staticmethod def is_displayed(player: Player): participant = player.participant return player.participant.vars['pareto'] >= 0.5 and player.round_number == \ player.participant.vars['task_rounds']['Pareto'] and player.participant.vars[ 'consent1'] == 0 class ResultsPareto1(Page): form_model = 'player' form_fields = ['Pareto1_01', 'Pareto1_02'] @staticmethod def is_displayed(player: Player): participant = player.participant return player.participant.vars['pareto'] >= 0.5 and player.round_number == \ player.participant.vars['task_rounds']['Pareto'] and player.participant.vars[ 'consent1'] == 0 @staticmethod def vars_for_template(player: Player): fields = get_quiz_dataPareto1() # we add an extra entry 'is_correct' (True/False) to each field for d in fields: d['is_correct'] = getattr(player, d['name']) == d['solution'] return dict(fields=fields, show_solutions=True) class ElicitationNormsPareto1(Page): # which forms are needed from class player form_model = 'player' form_fields = ['Pareto1_A', 'Pareto1_B'] # all 11 options list = form_fields @staticmethod def is_displayed(player: Player): participant = player.participant return player.participant.vars['pareto'] >= 0.5 and player.round_number == \ player.participant.vars['task_rounds']['Pareto'] and player.participant.vars[ 'consent1'] == 0 def before_next_page(player: Player, timeout_happened): for i in ElicitationNormsPareto1.list: player.participant.vars['round'][i][player.round_number] = player.participant.vars['round'][i][ player.round_number] + 1 if eval('player.' + i) == 1: player.session.vars['responses'][i]['Very Inappropriate'] = \ player.session.vars['responses'][i]['Very Inappropriate'] + 1 player.participant.vars['answers'][i]['Very Inappropriate'] = \ player.participant.vars['answers'][i]['Very Inappropriate'] + 1 elif eval('player.' + i) == 2: player.session.vars['responses'][i]['Inappropriate'] = \ player.session.vars['responses'][i]['Inappropriate'] + 1 player.participant.vars['answers'][i]['Inappropriate'] = \ player.participant.vars['answers'][i]['Inappropriate'] + 1 elif eval('player.' + i) == 3: player.session.vars['responses'][i]['Rather Inappropriate'] = \ player.session.vars['responses'][i]['Rather Inappropriate'] + 1 player.participant.vars['answers'][i]['Rather Inappropriate'] = \ player.participant.vars['answers'][i]['Rather Inappropriate'] + 1 elif eval('player.' + i) == 4: player.session.vars['responses'][i]['Rather Appropriate'] = \ player.session.vars['responses'][i]['Rather Appropriate'] + 1 player.participant.vars['answers'][i]['Rather Appropriate'] = \ player.participant.vars['answers'][i]['Rather Appropriate'] + 1 elif eval('player.' + i) == 5: player.session.vars['responses'][i]['Appropriate'] = \ player.session.vars['responses'][i]['Appropriate'] + 1 player.participant.vars['answers'][i]['Appropriate'] = \ player.participant.vars['answers'][i]['Appropriate'] + 1 else: player.session.vars['responses'][i]['Very Appropriate'] = \ player.session.vars['responses'][i]['Very Appropriate'] + 1 player.participant.vars['answers'][i]['Very Appropriate'] = \ player.participant.vars['answers'][i]['Very Appropriate'] + 1 class InstructionsNormsPareto2(Page): # which forms are needed from class player form_model = 'player' form_fields = ['Pareto2_01', 'Pareto2_02'] list = form_fields @staticmethod def is_displayed(player: Player): participant = player.participant return player.participant.vars['pareto'] < 0.5 and player.round_number == \ player.participant.vars['task_rounds']['Pareto'] and player.participant.vars[ 'consent1'] == 0 class ResultsPareto2(Page): form_model = 'player' form_fields = ['Pareto2_01', 'Pareto2_02'] @staticmethod def is_displayed(player: Player): participant = player.participant return player.participant.vars['pareto'] < 0.5 and player.round_number == \ player.participant.vars['task_rounds']['Pareto'] and player.participant.vars[ 'consent1'] == 0 @staticmethod def vars_for_template(player: Player): fields = get_quiz_dataPareto2() # we add an extra entry 'is_correct' (True/False) to each field for d in fields: d['is_correct'] = getattr(player, d['name']) == d['solution'] return dict(fields=fields, show_solutions=True) class ElicitationNormsPareto2(Page): # which forms are needed from class player form_model = 'player' form_fields = ['Pareto2_A', 'Pareto2_B'] # all 11 options list = form_fields @staticmethod def is_displayed(player: Player): participant = player.participant return player.participant.vars['pareto'] < 0.5 and player.round_number == \ player.participant.vars['task_rounds']['Pareto'] and player.participant.vars[ 'consent1'] == 0 def before_next_page(player: Player, timeout_happened): for i in ElicitationNormsPareto2.list: player.participant.vars['round'][i][player.round_number] = player.participant.vars['round'][i][ player.round_number] + 1 if eval('player.' + i) == 1: player.session.vars['responses'][i]['Very Inappropriate'] = \ player.session.vars['responses'][i]['Very Inappropriate'] + 1 player.participant.vars['answers'][i]['Very Inappropriate'] = \ player.participant.vars['answers'][i]['Very Inappropriate'] + 1 elif eval('player.' + i) == 2: player.session.vars['responses'][i]['Inappropriate'] = \ player.session.vars['responses'][i]['Inappropriate'] + 1 player.participant.vars['answers'][i]['Inappropriate'] = \ player.participant.vars['answers'][i]['Inappropriate'] + 1 elif eval('player.' + i) == 3: player.session.vars['responses'][i]['Rather Inappropriate'] = \ player.session.vars['responses'][i]['Rather Inappropriate'] + 1 player.participant.vars['answers'][i]['Rather Inappropriate'] = \ player.participant.vars['answers'][i]['Rather Inappropriate'] + 1 elif eval('player.' + i) == 4: player.session.vars['responses'][i]['Rather Appropriate'] = \ player.session.vars['responses'][i]['Rather Appropriate'] + 1 player.participant.vars['answers'][i]['Rather Appropriate'] = \ player.participant.vars['answers'][i]['Rather Appropriate'] + 1 elif eval('player.' + i) == 5: player.session.vars['responses'][i]['Appropriate'] = \ player.session.vars['responses'][i]['Appropriate'] + 1 player.participant.vars['answers'][i]['Appropriate'] = \ player.participant.vars['answers'][i]['Appropriate'] + 1 else: player.session.vars['responses'][i]['Very Appropriate'] = \ player.session.vars['responses'][i]['Very Appropriate'] + 1 player.participant.vars['answers'][i]['Very Appropriate'] = \ player.participant.vars['answers'][i]['Very Appropriate'] + 1 class InstructionsNormsSH1(Page): # which forms are needed from class player form_model = 'player' form_fields = ['SH1_01', 'SH1_02'] list = form_fields @staticmethod def is_displayed(player: Player): participant = player.participant return player.participant.vars['sh'] >= 0.5 and player.round_number == player.participant.vars['task_rounds'][ 'SH'] and player.participant.vars[ 'consent1'] == 0 class ResultsSH1(Page): form_model = 'player' form_fields = ['SH1_01', 'SH1_02'] @staticmethod def is_displayed(player: Player): participant = player.participant return player.participant.vars['sh'] >= 0.5 and player.round_number == player.participant.vars['task_rounds'][ 'SH'] and player.participant.vars[ 'consent1'] == 0 @staticmethod def vars_for_template(player: Player): fields = get_quiz_dataSH1() # we add an extra entry 'is_correct' (True/False) to each field for d in fields: d['is_correct'] = getattr(player, d['name']) == d['solution'] return dict(fields=fields, show_solutions=True) class ElicitationNormsSH1(Page): # which forms are needed from class player form_model = 'player' form_fields = ['SH1_S', 'SH1_H'] # all 11 options list = form_fields @staticmethod def is_displayed(player: Player): participant = player.participant return player.participant.vars['sh'] >= 0.5 and player.round_number == player.participant.vars['task_rounds'][ 'SH'] and player.participant.vars[ 'consent1'] == 0 def before_next_page(player: Player, timeout_happened): for i in ElicitationNormsSH1.list: player.participant.vars['round'][i][player.round_number] = player.participant.vars['round'][i][ player.round_number] + 1 if eval('player.' + i) == 1: player.session.vars['responses'][i]['Very Inappropriate'] = \ player.session.vars['responses'][i]['Very Inappropriate'] + 1 player.participant.vars['answers'][i]['Very Inappropriate'] = \ player.participant.vars['answers'][i]['Very Inappropriate'] + 1 elif eval('player.' + i) == 2: player.session.vars['responses'][i]['Inappropriate'] = \ player.session.vars['responses'][i]['Inappropriate'] + 1 player.participant.vars['answers'][i]['Inappropriate'] = \ player.participant.vars['answers'][i]['Inappropriate'] + 1 elif eval('player.' + i) == 3: player.session.vars['responses'][i]['Rather Inappropriate'] = \ player.session.vars['responses'][i]['Rather Inappropriate'] + 1 player.participant.vars['answers'][i]['Rather Inappropriate'] = \ player.participant.vars['answers'][i]['Rather Inappropriate'] + 1 elif eval('player.' + i) == 4: player.session.vars['responses'][i]['Rather Appropriate'] = \ player.session.vars['responses'][i]['Rather Appropriate'] + 1 player.participant.vars['answers'][i]['Rather Appropriate'] = \ player.participant.vars['answers'][i]['Rather Appropriate'] + 1 elif eval('player.' + i) == 5: player.session.vars['responses'][i]['Appropriate'] = \ player.session.vars['responses'][i]['Appropriate'] + 1 player.participant.vars['answers'][i]['Appropriate'] = \ player.participant.vars['answers'][i]['Appropriate'] + 1 else: player.session.vars['responses'][i]['Very Appropriate'] = \ player.session.vars['responses'][i]['Very Appropriate'] + 1 player.participant.vars['answers'][i]['Very Appropriate'] = \ player.participant.vars['answers'][i]['Very Appropriate'] + 1 class InstructionsNormsSH2(Page): # which forms are needed from class player form_model = 'player' form_fields = ['SH2_01', 'SH2_02'] list = form_fields @staticmethod def is_displayed(player: Player): participant = player.participant return player.participant.vars['sh'] < 0.5 and player.round_number == player.participant.vars['task_rounds'][ 'SH'] and player.participant.vars[ 'consent1'] == 0 class ResultsSH2(Page): form_model = 'player' form_fields = ['SH2_01', 'SH2_02'] @staticmethod def is_displayed(player: Player): participant = player.participant return player.participant.vars['sh'] < 0.5 and player.round_number == player.participant.vars['task_rounds'][ 'SH'] and player.participant.vars[ 'consent1'] == 0 @staticmethod def vars_for_template(player: Player): fields = get_quiz_dataSH2() # we add an extra entry 'is_correct' (True/False) to each field for d in fields: d['is_correct'] = getattr(player, d['name']) == d['solution'] return dict(fields=fields, show_solutions=True) class ElicitationNormsSH2(Page): # which forms are needed from class player form_model = 'player' form_fields = ['SH2_S', 'SH2_H'] # all 11 options list = form_fields @staticmethod def is_displayed(player: Player): participant = player.participant return player.participant.vars['sh'] < 0.5 and player.round_number == player.participant.vars['task_rounds'][ 'SH'] and player.participant.vars[ 'consent1'] == 0 def before_next_page(player: Player, timeout_happened): for i in ElicitationNormsSH2.list: player.participant.vars['round'][i][player.round_number] = player.participant.vars['round'][i][ player.round_number] + 1 if eval('player.' + i) == 1: player.session.vars['responses'][i]['Very Inappropriate'] = \ player.session.vars['responses'][i]['Very Inappropriate'] + 1 player.participant.vars['answers'][i]['Very Inappropriate'] = \ player.participant.vars['answers'][i]['Very Inappropriate'] + 1 elif eval('player.' + i) == 2: player.session.vars['responses'][i]['Inappropriate'] = \ player.session.vars['responses'][i]['Inappropriate'] + 1 player.participant.vars['answers'][i]['Inappropriate'] = \ player.participant.vars['answers'][i]['Inappropriate'] + 1 elif eval('player.' + i) == 3: player.session.vars['responses'][i]['Rather Inappropriate'] = \ player.session.vars['responses'][i]['Rather Inappropriate'] + 1 player.participant.vars['answers'][i]['Rather Inappropriate'] = \ player.participant.vars['answers'][i]['Rather Inappropriate'] + 1 elif eval('player.' + i) == 4: player.session.vars['responses'][i]['Rather Appropriate'] = \ player.session.vars['responses'][i]['Rather Appropriate'] + 1 player.participant.vars['answers'][i]['Rather Appropriate'] = \ player.participant.vars['answers'][i]['Rather Appropriate'] + 1 elif eval('player.' + i) == 5: player.session.vars['responses'][i]['Appropriate'] = \ player.session.vars['responses'][i]['Appropriate'] + 1 player.participant.vars['answers'][i]['Appropriate'] = \ player.participant.vars['answers'][i]['Appropriate'] + 1 else: player.session.vars['responses'][i]['Very Appropriate'] = \ player.session.vars['responses'][i]['Very Appropriate'] + 1 player.participant.vars['answers'][i]['Very Appropriate'] = \ player.participant.vars['answers'][i]['Very Appropriate'] + 1 class Moral(Page): # forms to retrieve individual information form_model = 'player' form_fields = ['MoralA1', 'MoralA2', 'MoralA3', 'MoralA4', 'MoralA5', 'MoralA6', 'MoralA7', 'MoralA8', 'MoralA9'] @staticmethod def is_displayed(player: Player): participant = player.participant return player.round_number == Constants.num_rounds and player.participant.vars['consent1'] == 0 class Moral1(Page): # forms to retrieve individual information form_model = 'player' form_fields = ['Moral_A1', 'Moral_A2', 'Moral_A3', 'Moral_A4', 'Moral_A5'] @staticmethod def is_displayed(player: Player): participant = player.participant return player.round_number == Constants.num_rounds and player.participant.vars['consent1'] == 0 class Moral2(Page): # forms to retrieve individual information form_model = 'player' form_fields = ['Moral_B1', 'Moral_B2', 'Moral_B3', 'Moral_B4', 'Moral_B5'] @staticmethod def is_displayed(player: Player): participant = player.participant return player.round_number == Constants.num_rounds and player.participant.vars['consent1'] == 0 page_sequence = [ConsentForm, TestInstructions, IntructionsTask2, InstructionsNormsEarnR, ResultsEarnR, ElicitationNormsEarnR, InstructionsNormsEarnD, ResultsEarnD, ElicitationNormsEarnD, InstructionsNormsKonowA, ResultsKonowA, ElicitationsNormsKonowA, InstructionsNormsKonowB, ResultsKonowB, ElicitationsNormsKonowB, InstructionsNormsPGGE, ResultsPGGE, ElicitationNormsPGGE, InstructionsNormsPGGI, ResultsPGGI, ElicitationNormsPGGI, InstructionsNormsVG3, ResultsVG3, ElicitationNormsVG3, InstructionsNormsVG16, ResultsVG16, ElicitationNormsVG16, InstructionsNormsPD1, ResultsPD1, ElicitationNormsPD1, InstructionsNormsPD2, ResultsPD2, ElicitationNormsPD2, InstructionsNormsPareto1, ResultsPareto1, ElicitationNormsPareto1, InstructionsNormsPareto2, ResultsPareto2, ElicitationNormsPareto2, InstructionsNormsSH1, ResultsSH1, ElicitationNormsSH1, InstructionsNormsSH2, ResultsSH2, ElicitationNormsSH2, Page2, Page3, QuestionnaireIntro, Moral1, Moral2, Moral, QuestionnaireRules, QuestionnaireAltruism1, QuestionnaireAltruism2, QuestionnaireRisk, QuestionnairePersonal, ResultsWaitPage, Results]