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 QM = [1, 2, 3, 4, 5] 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, 'Consentir et poursuivre'], [1, 'Laisser cette enquête']]) 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="Veuillez utiliser une échelle de 0 à 10, où 0 signifie que vous êtes 'totalement peu disposé à prendre des risques' et 10 que vous êtes 'très disposé à prendre des risques'. Vous pouvez également utiliser les valeurs intermédiaires pour indiquer où vous vous situez sur l'échelle.") altruistic = models.IntegerField(choices=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], widget=widgets.RadioSelectHorizontal, label="Veuillez utiliser une échelle de 0 à 10, où 0 signifie que vous n'êtes 'absolument pas disposé à partager' et 10 que vous êtes 'très disposé à partager'. Vous pouvez également utiliser les valeurs intermédiaires pour indiquer où vous vous situez sur l'échelle.") rules = models.IntegerField(choices=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], widget=widgets.RadioSelectHorizontal, label="Veuillez utiliser une échelle de 0 à 10, où 0 signifie que vous êtes 'complètement non disposé à suivre les règles' et 10 que vous êtes 'très disposé à suivre les règles'. Vous pouvez également utiliser les valeurs intermédiaires pour indiquer où vous vous situez sur l'échelle.") # This is for main choices, each variable is one row in the choice table MPL Pareto1_A = 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) Pareto1_B = 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) Pareto2_A = 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) Pareto2_B = 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) SH1_S = 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) SH1_H = 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) SH2_S = 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) SH2_H = 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) PD1_C = 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) PD1_D = 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) PD2_C = 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) PD2_D = 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) PE_0 = 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) PE_2 = 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) PE_4 = 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) PE_6 = 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) PE_8 = 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) PE_10 = 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) PI_0 = 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) PI_2 = 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) PI_4 = 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) PI_6 = 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) PI_8 = 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) PI_10 = 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) VG3_0 = 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) VG3_2 = 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) VG3_4 = 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) VG3_6 = 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) VG3_8 = 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) VG3_10 = 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) VG16_0 = 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) VG16_2 = 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) VG16_4 = 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) VG16_6 = 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) VG16_8 = 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) VG16_10 = 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) EarnR_1 = 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) EarnR_2 = 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) EarnR_3 = 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) EarnR_4 = 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) EarnR_5 = 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) EarnR_6 = 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) EarnR_7 = 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) EarnR_8 = 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) EarnR_9 = 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) EarnR_10 = 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) EarnR_11 = 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) 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, '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_2 = 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_3 = 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_4 = 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_5 = 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_6 = 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_7 = 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_8 = 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_9 = 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_10 = 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_11 = 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) Konow_A1 = 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) Konow_A2 = 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) Konow_A3 = 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) Konow_A4 = 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) Konow_A5 = 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) Konow_A6 = 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) Konow_A7 = 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) Konow_A8 = 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) Konow_A9 = 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) Konow_A10 = 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) Konow_A11 = 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) Konow_B1 = 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) Konow_B2 = 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) Konow_B3 = 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) Konow_B4 = 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) Konow_B5 = 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) Konow_B6 = 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) Konow_B7 = 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) Konow_B8 = 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) Konow_B9 = 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) Konow_B10 = 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) Konow_B11 = 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) Q_1 = 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) MoralA1 = models.PositiveIntegerField(choices=[[1, 'Pas du tout d\'accord
'], [2, 'Pas d\'accord
'], [3, 'Plutôt pas d\'accord
'], [4, 'Indifférent
'], [5, 'Plutôt d\'accord
'], [6, 'D\'accord
'], [7, 'Tout à fait d\'accord
']], widget=widgets.RadioSelectHorizontal) MoralA2 = models.PositiveIntegerField(choices=[[1, 'Pas du tout d\'accord
'], [2, 'Pas d\'accord
'], [3, 'Plutôt pas d\'accord
'], [4, 'Indifférent
'], [5, 'Plutôt d\'accord
'], [6, 'D\'accord
'], [7, 'Tout à fait d\'accord
']], widget=widgets.RadioSelectHorizontal) MoralA3 = models.PositiveIntegerField(choices=[[1, 'Pas du tout d\'accord
'], [2, 'Pas d\'accord
'], [3, 'Plutôt pas d\'accord
'], [4, 'Indifférent
'], [5, 'Plutôt d\'accord
'], [6, 'D\'accord
'], [7, 'Tout à fait d\'accord
']], widget=widgets.RadioSelectHorizontal) MoralA4 = models.PositiveIntegerField(choices=[[1, 'Pas du tout d\'accord
'], [2, 'Pas d\'accord
'], [3, 'Plutôt pas d\'accord
'], [4, 'Indifférent
'], [5, 'Plutôt d\'accord
'], [6, 'D\'accord
'], [7, 'Tout à fait d\'accord
']], widget=widgets.RadioSelectHorizontal) MoralA5 = models.PositiveIntegerField(choices=[[1, 'Pas du tout d\'accord
'], [2, 'Pas d\'accord
'], [3, 'Plutôt pas d\'accord
'], [4, 'Indifférent
'], [5, 'Plutôt d\'accord
'], [6, 'D\'accord
'], [7, 'Tout à fait d\'accord
']], widget=widgets.RadioSelectHorizontal) MoralA6 = models.PositiveIntegerField(choices=[[1, 'Pas du tout d\'accord
'], [2, 'Pas d\'accord
'], [3, 'Plutôt pas d\'accord
'], [4, 'Indifférent
'], [5, 'Plutôt d\'accord
'], [6, 'D\'accord
'], [7, 'Tout à fait d\'accord
']], widget=widgets.RadioSelectHorizontal) MoralA7 = models.PositiveIntegerField(choices=[[1, 'Pas du tout d\'accord
'], [2, 'Pas d\'accord
'], [3, 'Plutôt pas d\'accord
'], [4, 'Indifférent
'], [5, 'Plutôt d\'accord
'], [6, 'D\'accord
'], [7, 'Tout à fait d\'accord
']], widget=widgets.RadioSelectHorizontal) MoralA8 = models.PositiveIntegerField(choices=[[1, 'Pas du tout d\'accord
'], [2, 'Pas d\'accord
'], [3, 'Plutôt pas d\'accord
'], [4, 'Indifférent
'], [5, 'Plutôt d\'accord
'], [6, 'D\'accord
'], [7, 'Tout à fait d\'accord
']], widget=widgets.RadioSelectHorizontal) MoralA9 = models.PositiveIntegerField(choices=[[1, 'Pas du tout d\'accord
'], [2, 'Pas d\'accord
'], [3, 'Plutôt pas d\'accord
'], [4, 'Indifférent
'], [5, 'Plutôt d\'accord
'], [6, 'D\'accord
'], [7, 'Tout à fait d\'accord
']], widget=widgets.RadioSelectHorizontal) Moral_A1 = models.PositiveIntegerField(choices=[[1, 'Pas du tout d\'accord
'], [2, 'Pas d\'accord
'], [3, 'Plutôt pas d\'accord
'], [4, 'Indifférent
'], [5, 'Plutôt d\'accord
'], [6, 'D\'accord
'], [7, 'Tout à fait d\'accord
']], widget=widgets.RadioSelectHorizontal) Moral_A2 = models.PositiveIntegerField(choices=[[1, 'Pas du tout d\'accord
'], [2, 'Pas d\'accord
'], [3, 'Plutôt pas d\'accord
'], [4, 'Indifférent
'], [5, 'Plutôt d\'accord
'], [6, 'D\'accord
'], [7, 'Tout à fait d\'accord
']], widget=widgets.RadioSelectHorizontal) Moral_A3 = models.PositiveIntegerField(choices=[[1, 'Pas du tout d\'accord
'], [2, 'Pas d\'accord
'], [3, 'Plutôt pas d\'accord
'], [4, 'Indifférent
'], [5, 'Plutôt d\'accord
'], [6, 'D\'accord
'], [7, 'Tout à fait d\'accord
']], widget=widgets.RadioSelectHorizontal) Moral_A4 = models.PositiveIntegerField(choices=[[1, 'Pas du tout d\'accord
'], [2, 'Pas d\'accord
'], [3, 'Plutôt pas d\'accord
'], [4, 'Indifférent
'], [5, 'Plutôt d\'accord
'], [6, 'D\'accord
'], [7, 'Tout à fait d\'accord
']], widget=widgets.RadioSelectHorizontal) Moral_A5 = models.PositiveIntegerField(choices=[[1, 'Pas du tout d\'accord
'], [2, 'Pas d\'accord
'], [3, 'Plutôt pas d\'accord
'], [4, 'Indifférent
'], [5, 'Plutôt d\'accord
'], [6, 'D\'accord
'], [7, 'Tout à fait d\'accord
']], widget=widgets.RadioSelectHorizontal) Moral_B1 = models.PositiveIntegerField(choices=[[1, 'Pas du tout d\'accord
'], [2, 'Pas d\'accord
'], [3, 'Plutôt pas d\'accord
'], [4, 'Indifférent
'], [5, 'Plutôt d\'accord
'], [6, 'D\'accord
'], [7, 'Tout à fait d\'accord
']], widget=widgets.RadioSelectHorizontal) Moral_B2 = models.PositiveIntegerField(choices=[[1, 'Pas du tout d\'accord
'], [2, 'Pas d\'accord
'], [3, 'Plutôt pas d\'accord
'], [4, 'Indifférent
'], [5, 'Plutôt d\'accord
'], [6, 'D\'accord
'], [7, 'Tout à fait d\'accord
']], widget=widgets.RadioSelectHorizontal) Moral_B3 = models.PositiveIntegerField(choices=[[1, 'Pas du tout d\'accord
'], [2, 'Pas d\'accord
'], [3, 'Plutôt pas d\'accord
'], [4, 'Indifférent
'], [5, 'Plutôt d\'accord
'], [6, 'D\'accord
'], [7, 'Tout à fait d\'accord
']], widget=widgets.RadioSelectHorizontal) Moral_B4 = models.PositiveIntegerField(choices=[[1, 'Pas du tout d\'accord
'], [2, 'Pas d\'accord
'], [3, 'Plutôt pas d\'accord
'], [4, 'Indifférent
'], [5, 'Plutôt d\'accord
'], [6, 'D\'accord
'], [7, 'Tout à fait d\'accord
']], widget=widgets.RadioSelectHorizontal) Moral_B5 = models.PositiveIntegerField(choices=[[1, 'Pas du tout d\'accord
'], [2, 'Pas d\'accord
'], [3, 'Plutôt pas d\'accord
'], [4, 'Indifférent
'], [5, 'Plutôt d\'accord
'], [6, 'D\'accord
'], [7, 'Tout à fait d\'accord
']], widget=widgets.RadioSelectHorizontal) EarnD1 = models.PositiveIntegerField(choices=[[1, 'La Personne A et la Personne B ont toutes deux effectué une tâche qui a duré 30 minutes.'], [2, 'La Personne A a effectué une tâche qui a duré 30 minutes. La Personne A divise le montant gagné par la Personne A.'], [3, 'La Personne B a effectué une tâche qui a duré 30 minutes. La Personne A divise le montant gagné par la Personne B.']], label="Laquelle des affirmations suivantes est correcte concernant la situation décrite ?", widget=widgets.RadioSelect) EarnD2 = models.PositiveIntegerField(choices=[[1, 'La Personne A gagne 7€ et la Personne B gagne 13€.'], [2, 'La Personne A gagne 17€ et la Personne B gagne 3€.'], [3, 'La Personne A gagne 7€ et la Personne B gagne 3€.']], label="Combien gagnent la Personne A et la Personne B, si la Personne A donne 3€ à la Personne B ?", widget=widgets.RadioSelect) EarnD3 = models.PositiveIntegerField(choices=[[1, 'La Personne A gagne 3€ et la Personne B gagne 7€.'], [2, 'La Personne A gagne 13€ et la Personne B gagne 7€.'], [3, 'La Personne A gagne 3€ et la Personne B gagne 17€.']], label="Combien gagnent la Personne A et la Personne B, si la Personne A donne 7€ à la Personne B ? ", widget=widgets.RadioSelect) EarnR1 = models.PositiveIntegerField(choices=[[1, 'La Personne A et la Personne B ont toutes deux effectué une tâche qui a duré 30 minutes.'], [2, 'La Personne A a effectué une tâche qui a duré 30 minutes. La Personne A divise le montant gagné par la Personne A.'], [3, 'La Personne B a effectué une tâche qui a duré 30 minutes. La Personne A divise le montant gagné par la Personne B.']], label="Laquelle des affirmations suivantes est correcte concernant la situation décrite ?", widget=widgets.RadioSelect) EarnR2 = models.PositiveIntegerField(choices=[[1, 'La Personne A gagne 13€ et la Personne B gagne 7€.'], [2, 'La Personne A gagne 7€ et la Personne B gagne 13€.'], [3, 'La Personne A gagne 7€ et la Personne B gagne 3€.']], label="Combien gagnent la Personne A et la Personne B, si la Personne A donne 3€ à la Personne B ?", widget=widgets.RadioSelect) EarnR3 = models.PositiveIntegerField(choices=[[1, 'La Personne A gagne 3€ et la Personne B gagne 7€.'], [2, 'La Personne A gagne 13€ et la Personne B gagne 7€.'], [3, 'La Personne A gagne 3€ et la Personne B gagne 17€.']], label="Combien gagnent la Personne A et la Personne B, si la Personne A donne 7€ à la Personne B ?", widget=widgets.RadioSelect) KonowA1 = models.PositiveIntegerField(choices=[[1, 'La Personne A a effectué une tâche qui a duré 30 minutes. La Personne A partage l\'argent qu\'il/elle a gagné entre la Personne A et la Personne B.'], [2, 'La Personne A et la Personne B ont effectué une tâche qui a duré 30 minutes. La Personne A divise l\'argent que la Personne B a gagné entre la Personne A et la Personne B.'], [3, 'La Personne A et la Personne B ont effectué une tâche qui a duré 30 minutes. La Personne A divise l\'argent que la Personne A et la Personne B ont gagné entre la Personne A et la Personne B.' ]], label="Laquelle des affirmations suivantes est correcte concernant la situation décrite ?", widget=widgets.RadioSelect) KonowA2 = models.PositiveIntegerField(choices=[[1, 'Dans la première étape, la Personne A a gagné plus d\'argent que la Personne B parce que la Personne A a répondu correctement à plus de tableaux.'], [2, 'Dans la première étape, la Personne A a gagné plus d\'argent que la Personne B parce que la Personne A a été assignée au hasard à un paiement plus élevé par réponse correcte que la Personne B.'], [3, 'Dans la première étape, la Personne A a gagné plus d\'argent que la Personne B parce que la Personne B a répondu correctement à plus de tableaux.']], label="Après la première étape, la Personne A a gagné 8€ et la Personne B a gagné 2€. Laquelle des affirmations suivantes est correcte concernant la situation décrite ?", widget=widgets.RadioSelect) KonowB1 = models.PositiveIntegerField(choices=[[1, 'La Personne A a effectué une tâche qui a duré 30 minutes. La Personne A divise l\'argent qu\'il/elle a gagné entre la Personne A et la Personne B.'], [2, 'La Personne A et la Personne B ont effectué une tâche qui a duré 30 minutes. La Personne A divise l\'argent que la Personne B a gagné entre la Personne A et la Personne B.'], [3, 'La Personne A et la Personne B ont effectué une tâche qui a duré 30 minutes. La Personne A divise l\'argent que la Personne A et la Personne B ont gagné entre la Personne A et la Personne B.' ]], label="Laquelle des affirmations suivantes est correcte concernant la situation décrite ?", widget=widgets.RadioSelect) KonowB2 = models.PositiveIntegerField(choices=[[1, 'Dans la première étape, la Personne A a gagné plus d\'argent que la Personne B parce que la Personne A a répondu correctement à plus de tableaux.'], [2, 'Dans la première étape, la Personne A a gagné plus d\'argent que la Personne B parce que la Personne A a été assignée au hasard à un paiement plus élevé par réponse correcte que la Personne B.'], [3, 'Dans la première étape, la Personne A a gagné plus d\'argent que la Personne B parce que la Personne B a répondu correctement à plus de tableaux.']], label="Après la première étape, la Personne A a gagné 8€ et la Personne B a gagné 2€. Laquelle des affirmations suivantes est correcte concernant la situation décrite ?", widget=widgets.RadioSelect) SH1_01 = models.PositiveIntegerField(choices=[[1, 'La Personne A gagne 10€.'], [2, 'La Personne A gagne 10€ si la Personne B choisit l\'action B1, et 3€ si la Personne B choisit l\'action B2.'], [3, 'La Personne A gagne 10€ si la Personne B choisit l\'action B1, et 0€ si la Personne B choisit l\'action B2.']], label="Combien d'argent la Personne A gagne-t-elle si elle choisit l'action A1 ?", widget=widgets.RadioSelect) SH1_02 = models.PositiveIntegerField(choices=[[1, 'La Personne A gagne 3€.'], [2, 'La Personne A gagne 0€ si la Personne B choisit l\'action B1, et 3€ si la Personne B choisit l\'action B2.'], [3, 'La Personne A gagne 3€ si la Personne B choisit l\'action B1, et 0€ si la Personne B choisit l\'action B2.']], label="Combien d'argent la Personne A gagne-t-elle si elle choisit l'action A2 ?", widget=widgets.RadioSelect) SH2_01 = models.PositiveIntegerField(choices=[[1, 'La Personne A gagne 5€.'], [2, 'La Personne A gagne 5€ si la Personne B choisit l\'action B1, et 3€ si la Personne B choisit l\'action B2.'], [3, 'La Personne A gagne 5€ si la Personne B choisit l\'action B1, et 0€ si la Personne B choisit l\'action B2.']], label="Combien d'argent la Personne A gagne-t-elle si elle choisit l'action A1 ?", widget=widgets.RadioSelect) SH2_02 = models.PositiveIntegerField(choices=[[1, 'La Personne A gagne 3€.'], [2, 'La Personne A gagne 0€ si la Personne B choisit l\'action B1, et 3€ si la Personne B choisit l\'action B2.'], [3, 'La Personne A gagne 3€ si la Personne B choisit l\'action B1, et 0€ si la Personne B choisit l\'action B2.']], label="Combien d'argent la Personne A gagne-t-elle si elle choisit l'action A2 ?", widget=widgets.RadioSelect) PGGE1 = models.PositiveIntegerField(choices=[[1, 'Nous pouvons calculer les gains de la Personne A en ne connaissant que sa décision.'], [2, 'Les gains de la Personne A sont la somme de l\'argent qu\'elle a placé dans le Projet 1 et de l\'argent que seulement elle a placé dans le Projet 2.'], [3, 'Chaque individu prend sa décision sans connaître la décision des autres membres du groupe.']], label="Laquelle des affirmations suivantes est correcte concernant la situation décrite ?", widget=widgets.RadioSelect) PGGE2 = models.PositiveIntegerField(choices=[[1, '11€. (5€ x 1) = 5€ du Projet 1 et (5€ x 1,20) = 6€ du Projet 2.'], [2, '10€. (5€ x 1) = 5€ du Projet 1 et (5€ x 1) = 5€ du Projet 2.'], [3, '9€. (5€ x 1) = 5€ du Projet 1 et (5€ x 0,80) = 4€ du Projet 2']], label="Combien d'argent est généré au total si la Personne A place 5€ dans le Projet 1 et 5€ dans le Projet 2 ?", widget=widgets.RadioSelect) PGGI1 = models.PositiveIntegerField(choices=[[1, 'Nous pouvons calculer les gains de la Personne A en ne connaissant que sa décision.'], [2, 'Les gains de la Personne A sont la somme de l\'argent qu\'elle a placé dans le Projet 1 et de l\'argent que seulement elle a placé dans le Projet 2.'], [3, 'Chaque individu prend sa décision sans connaître la décision des autres membres du groupe.']], label="Laquelle des affirmations suivantes est correcte concernant la situation décrite ?", widget=widgets.RadioSelect) PGGI2 = models.PositiveIntegerField(choices=[[1, '11€. (5€ x 1) = 5€ du Projet 1 et (5€ x 1,20) = 6€ du Projet 2.'], [2, '10€. (5€ x 1) = 5€ du Projet 1 et (5€ x 1) = 5€ du Projet 2.'], [3, '9€. (5€ x 1) = 5€ du Projet 1 et (5€ x 0,80) = 4€ du Projet 2']], label="Combien d'argent est généré au total si la Personne A place 5€ dans le Projet 1 et 5€ dans le Projet 2 ?", widget=widgets.RadioSelect) VG3_01 = models.PositiveIntegerField(choices=[[1, '3 participants.'], [2, '2 participants.'], [3, 'Cette information n\'est pas fournie dans les instructions.']], label="Dans la situation décrite, le groupe est composé de combien de participants au total ?", widget=widgets.RadioSelect) VG3_02 = models.PositiveIntegerField(choices=[[1, '10€'], [2, '5€'], [3, 'Pour répondre à cette question, il est nécessaire de connaître les actions choisies par les autres membres du groupe.']], label="Combien la Personne A gagne-t-elle si elle choisit l'action X ?", widget=widgets.RadioSelect) VG3_03 = models.PositiveIntegerField(choices=[[1, '10€'], [2, '5€'], [3, 'Pour répondre à cette question, il est nécessaire de connaître les actions choisies par les autres membres du groupe.']], label="Combien la Personne A gagne-t-elle si elle choisit l'action Y ?", widget=widgets.RadioSelect) VG16_01 = models.PositiveIntegerField(choices=[[1, '16 participants.'], [2, '15 participants.'], [3, 'Cette information n\'est pas fournie dans les instructions.']], label="Dans la situation décrite, le groupe est composé de combien de participants au total ?", widget=widgets.RadioSelect) VG16_02 = models.PositiveIntegerField(choices=[[1, '10€'], [2, '5€'], [3, 'Pour répondre à cette question, il est nécessaire de connaître les actions choisies par les autres membres du groupe.']], label="Combien la Personne A gagne-t-elle si elle choisit l'action X ?", widget=widgets.RadioSelect) VG16_03 = models.PositiveIntegerField(choices=[[1, '10€'], [2, '5€'], [3, 'Pour répondre à cette question, il est nécessaire de connaître les actions choisies par les autres membres du groupe.']], label="Combien la Personne A gagne-t-elle si elle choisit l'action Y ?", widget=widgets.RadioSelect) PD1_01 = models.PositiveIntegerField(choices=[[1, 'La Personne A gagne 7€.'], [2, 'La Personne A gagne 7€ si la Personne B choisit l\'action B1, et 12€ si la Personne B choisit l\'action B2.'], [3, 'La Personne A gagne 7€ si la Personne B choisit l\'action B1, et 0€ si la Personne B choisit l\'action B2.']], label="Combien la Personne A gagne-t-elle si elle choisit l'action A1 ?", widget=widgets.RadioSelect) PD1_02 = models.PositiveIntegerField(choices=[[1, 'La Personne A gagne 4€.'], [2, 'La Personne A gagne 12€ si la Personne B choisit l\'action B1, et 4€ si la Personne B choisit l\'action B2.'], [3, 'La Personne A gagne 0€ si la Personne B choisit l\'action B1, et 4€ si la Personne B choisit l\'action B2.']], label="Combien la Personne A gagne-t-elle si elle choisit l'action A2 ?", widget=widgets.RadioSelect) PD2_01 = models.PositiveIntegerField(choices=[[1, 'La Personne A gagne 7€.'], [2, 'La Personne A gagne 7€ si la Personne B choisit l\'action B1, et 12€ si la Personne B choisit l\'action B2.'], [3, 'La Personne A gagne 7€ si la Personne B choisit l\'action B1, et 3€ si la Personne B choisit l\'action B2.']], label="Combien la Personne A gagne-t-elle si elle choisit l'action A1 ?", widget=widgets.RadioSelect) PD2_02 = models.PositiveIntegerField(choices=[[1, 'La Personne A gagne 4€.'], [2, 'La Personne A gagne 12€ si la Personne B choisit l\'action B1, et 4€ si la Personne B choisit l\'action B2.'], [3, 'La Personne A gagne 3€ si la Personne B choisit l\'action B1, et 4€ si la Personne B choisit l\'action B2.']], label="Combien la Personne A gagne-t-elle si elle choisit l'action A2 ?", widget=widgets.RadioSelect) Pareto1_01 = models.PositiveIntegerField(choices=[[1, 'La Personne A gagne 5€.'], [2, 'La Personne A gagne 5€ si la Personne B choisit l\'action B1, et 0€ si la Personne B choisit l\'action B2.'], [3, 'La Personne A gagne 0€ si la Personne B choisit l\'action B1, et 1€ si la Personne B choisit l\'action B2.']], label="Combien la Personne A gagne-t-elle si elle choisit l'action A1 ?", widget=widgets.RadioSelect) Pareto1_02 = models.PositiveIntegerField(choices=[[1,'La Personne A gagne 1€.'], [2, 'La Personne A gagne 5€ si la Personne B choisit l\'action B1, et 0€ si la Personne B choisit l\'action B2.'], [3, 'La Personne A gagne 0€ si la Personne B choisit l\'action B1, et 1€ si la Personne B choisit l\'action B2.']], label="Combien la Personne A gagne-t-elle si elle choisit l'action A2 ?", widget=widgets.RadioSelect) Pareto2_01 = models.PositiveIntegerField(choices=[[1, 'La Personne A gagne 3€.'], [2, 'La Personne A gagne 3€ si la Personne B choisit l\'action B1, et 0€ si la Personne B choisit l\'action B2.'], [3, 'La Personne A gagne 0€ si la Personne B choisit l\'action B1, et 1€ si la Personne B choisit l\'action B2.']], label="Combien la Personne A gagne-t-elle si elle choisit l'action A1 ?", widget=widgets.RadioSelect) Pareto2_02 = models.PositiveIntegerField(choices=[[1,'La Personne A gagne 1€.'], [2, 'La Personne A gagne 3€ si la Personne B choisit l\'action B1, et 0€ si la Personne B choisit l\'action B2.'], [3, 'La Personne A gagne 0€ si la Personne B choisit l\'action B1, et 1€ si la Personne B choisit l\'action B2.']], label="Combien la Personne A gagne-t-elle si elle choisit l'action A2 ?", widget=widgets.RadioSelect) # These variables are collected in the final questionnaire Genre = models.StringField(widget=widgets.RadioSelectHorizontal(), choices=['Homme', 'Femme', 'Je préfère ne pas répondre']) Âge = models.IntegerField(choices=range(18, 60, 1)) Études = models.TextField(label="Quels sont votre domaine d'études ? (Exemple : Droit).") Nationalité = models.TextField(label="Quel est votre domaine d'études (Exemple : Français)") # 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: ttt = Constants.QM.copy() random.shuffle(ttt) player.participant.vars['moral'] = ttt 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="La réponse choisie est incorrecte. La bonne réponse est 'La Personne A gagne 10€ si la Personne B choisit l'action B1, et 0€ si la Personne B choisit l'action B2'. Notez que les gains des deux personnes dépendent des actions choisies par la Personne A et la Personne B. Les gains dans tous les cas possibles sont spécifiés dans les instructions ci-dessus. Si la Personne A choisit l'action A1 et la Personne B choisit l'action B1, alors la Personne A et la Personne B gagnent 10€ chacun. Si la Personne A choisit l'action A1 et la Personne B choisit l'action B2, alors la Personne A gagne 0€ et la Personne B gagne 3€.", ), dict( name='SH1_02', solution=1, explanation="La réponse choisie est incorrecte. La bonne réponse est 'La Personne A gagne 3€'. Notez que les gains des deux personnes dépendent des actions sélectionnées par la Personne A et la Personne B. Les gains dans tous les cas possibles sont spécifiés dans les instructions ci-dessus. Si la Personne A choisit l'action A2 et la Personne B choisit l'action B1, alors la Personne A gagne 3€ et la Personne B gagne 0€. Si la Personne A choisit l'action A2 et la Personne B choisit l'action B2, alors la Personne A et la Personne B gagnent 3€ chacun. Ensuite, la Personne A gagne 3€ indépendamment de l'action choisie par la Personne B.", ), ] def get_quiz_data1(): return [ dict( name='Q1', solution=3, explanation="balbbaba", ), ] def get_quiz_dataSH2(): return [ dict( name='SH2_01', solution=3, explanation="La réponse choisie est incorrecte. La bonne réponse est 'La Personne A gagne 5€ si la Personne B choisit l'action B1, et 0€ si la Personne B choisit l'action B2'. Notez que les gains des deux personnes dépendent des actions choisies par la Personne A et la Personne B. Les gains dans tous les cas possibles sont spécifiés dans les instructions ci-dessus. Si la Personne A choisit l'action A1 et la Personne B choisit l'action B1, alors la Personne A et la Personne B gagnent 5€ chacun. Si la Personne A choisit l'action A1 et la Personne B choisit l'action B2, alors la Personne A gagne 0€ et la Personne B gagne 3€.", ), dict( name='SH2_02', solution=1, explanation="La réponse choisie est incorrecte. La bonne réponse est 'La Personne A gagne 3€'. Notez que les gains des deux personnes dépendent des actions sélectionnées par la Personne A et la Personne B. Les gains dans tous les cas possibles sont spécifiés dans les instructions ci-dessus. Si la Personne A choisit l'action A2 et la Personne B choisit l'action B1, alors la Personne A gagne 3€ et la Personne B gagne 0€. Si la Personne A choisit l'action A2 et la Personne B choisit l'action B2, alors la Personne A et la Personne B gagnent 3€ chacun. Ensuite, la Personne A gagne 3€ indépendamment de l'action choisie par la Personne B.", ), ] def get_quiz_dataPGGE(): return [ dict( name='PGGE1', solution=3, explanation="La réponse choisie est incorrecte. La bonne réponse est 'Chaque individu prend sa décision sans connaître la décision des autres membres du groupe.'. Notez que les décisions sont prises simultanément, ce qui signifie que tous les membres du groupe prennent leur décision en même temps. Par conséquent, ils ne connaissent pas la décision des autres lorsqu'ils prennent leur décision.", ), dict( name='PGGE2', solution=1, explanation="La réponse choisie est incorrecte. La bonne réponse est '11€. (5€ x 1) = 5€ du Projet 1 et (5€ x 1,20) = 6€ du Projet 2.'. Notez que chaque 1€ placé par une personne dans le Projet 2 génère un rendement total en espèces de 1,20€. Alors, les 5€ que la Personne A place dans le Projet 2 donnent un rendement total de (5€ x 1,20) = 6€. D'autre part, les 5€ que la Personne A place dans le Projet 1 donnent un rendement total de 5€. Le rendement total est donc de 5€ + 6€ = 11€.", ), ] def get_quiz_dataPGGI(): return [ dict( name='PGGI1', solution=3, explanation="La réponse choisie est incorrecte. La bonne réponse est 'Chaque individu prend sa décision sans connaître la décision des autres membres du groupe.'. Notez que les décisions sont prises simultanément, ce qui signifie que tous les membres du groupe prennent leur décision en même temps. Par conséquent, ils ne connaissent pas la décision des autres lorsqu'ils prennent leur décision. ", ), dict( name='PGGI2', solution=3, explanation="La réponse choisie est incorrecte. La bonne réponse est '9€. (5€ x 1) = 5€ du Projet 1 et (5€ x 0,80) = 4€ du Projet 2.' Notez que chaque 1€ placé par une personne dans le projet 2 génère un rendement total en espèces de 0,80€. Alors, les 5€ que la Personne A place dans le Projet 2 donnent un rendement total de (5€ x 0,80) = 4€. D'autre part, les 5€ que la Personne A place dans le Projet 1 donnent un rendement total de 5€. Le rendement total est donc de 4€+ 5€ = 9€.", ), ] def get_quiz_dataVG3(): return [ dict( name='VG3_01', solution=1, explanation="La réponse choisie est incorrecte. La bonne réponse est '3 participants'. Rappelons que la Personne A est placée au hasard dans un groupe avec 2 autres participants. La taille totale du groupe est donc de 2 participants + 1 participant (Personne A) = 3 participants.",), dict( name='VG3_02', solution=2, explanation="La réponse choisie est incorrecte. La bonne réponse est '5€'. Les individus qui choisissent X gagnent 5€ indépendamment des actions choisies par les autres individus. Si la Personne A choisit X, la Personne A, ainsi que tous les individus qui ont choisi X, obtiennent 5€. En revanche, tous les individus qui ont choisi Y obtiennent 10€.", ), dict( name='VG3_03', solution=3, explanation="La réponse choisie est incorrecte. La bonne réponse est 'Pour répondre à cette question, il est nécessaire de connaître les actions choisies par les autres membres du groupe'. Si la Personne A choisit Y, la Personne A obtient 10€ si au moins un individu du groupe choisit X, et 0€ sinon.", ), ] def get_quiz_dataVG16(): return [ dict( name='VG16_01', solution=1, explanation="La réponse choisie est incorrecte. La bonne réponse est '16 participants'. Rappelons que la Personne A est placée au hasard dans un groupe avec 15 autres participants. La taille totale du groupe est donc de 15 participants + 1 participant (Personne A) = 16 participants.", ), dict( name='VG16_02', solution=2, explanation="La réponse choisie est incorrecte. La bonne réponse est '5€'. Les individus qui choisissent X gagnent 5€ indépendamment des actions choisies par les autres individus. Si la Personne A choisit X, la Personne A, ainsi que tous les individus qui ont choisi X, obtiennent 5€. En revanche, tous les individus qui ont choisi Y obtiennent 10€.", ), dict( name='VG16_03', solution=3, explanation="La réponse choisie est incorrecte. La bonne réponse est 'Pour répondre à cette question, il est nécessaire de connaître les actions choisies par les autres membres du groupe'. Si la Personne A choisit Y, la Personne A obtient 10€ si au moins un individu du groupe choisit X, et 0€ sinon.", ), ] def get_quiz_dataPD1(): return [ dict( name='PD1_01', solution=3, explanation="La réponse choisie est incorrecte. La bonne réponse est 'La Personne A gagne 7€ si la Personne B choisit l'action B1, et 0€ si la Personne B choisit l'action B2'. Notez que les gains des deux Personnes dépendent des actions choisies par la Personne A et la Personne B. Les gains dans tous les cas possibles sont spécifiés dans les instructions ci-dessus. Si la Personne A choisit l'action A1 et la Personne B choisit l'action B1, alors la Personne A et la Personne B gagnent 7€ chacun. Si la Personne A choisit l'action A1 et la Personne B choisit l'action B2, alors la Personne A gagne 0€ et la Personne B gagne 12€.", ), dict( name='PD1_02', solution=2, explanation="La réponse choisie est incorrecte. La bonne réponse est 'La Personne A gagne 12€ si la Personne B choisit l'action B1, et 4€ si la Personne B choisit l'action B2'. Notez que les gains des deux personnes dépendent des actions choisies par la Personne A et la Personne B. Les gains dans tous les cas possibles sont spécifiés dans les instructions ci-dessus. Si la Personne A choisit l'action A2 et la Personne B choisit l'action B1, alors la Personne A gagne 12€ et la Personne B gagne 0€. Si la Personne A choisit l'action A2 et la Personne B choisit l'action B2, alors la Personne A et la Personne B gagnent 4€ chacun.", ), ] def get_quiz_dataPD2(): return [ dict( name='PD2_01', solution=3, explanation="La réponse choisie est incorrecte. La bonne réponse est 'La Personne A gagne 7€ si la Personne B choisit l'action B1, et 3€ si la Personne B choisit l'action B2'. Notez que les gains des deux personnes dépendent des actions choisies par la Personne A et la Personne B. Les gains dans tous les cas possibles sont spécifiés dans les instructions ci-dessus. Si la Personne A choisit l'action A1 et la Personne B choisit l'action B1, alors la Personne A et la Personne B gagnent 7€ chacun. Si la Personne A choisit l'action A1 et la Personne B choisit l'action B2, alors la Personne A gagne 3€ et la Personne B gagne 12€.", ), dict( name='PD2_02', solution=2, explanation="La réponse choisie est incorrecte. La bonne réponse est 'La Personne A gagne 12€ si la Personne B choisit l'action B1, et 4€ si la Personne B choisit l'action B2'. Notez que les gains des deux personnes dépendent des actions choisies par la Personne A et la Personne B. Les gains dans tous les cas possibles sont spécifiés dans les instructions ci-dessus. Si la Personne A choisit l'action A2 et la Personne B choisit l'action B1, alors la Personne A gagne 12€ et la Personne B gagne 3€. Si la Personne A choisit l'action A2 et la Personne B choisit l'action B2, alors la Personne A et la Personne B gagnent 4€ chacun.", ), ] def get_quiz_dataPareto1(): return [ dict( name='Pareto1_01', solution=2, explanation="La réponse choisie est incorrecte. La bonne réponse est 'La Personne A gagne 5€ si la Personne B choisit l'action B1, et 0€ si la Personne B choisit l'action B2'. Notez que les gains des deux personnes dépendent des actions choisies par la Personne A et la Personne B. Les gains dans tous les cas possibles sont spécifiés dans les instructions ci-dessus. Si la Personne A choisit l'action A1 et la Personne B choisit l'action B1, alors la Personne A et la Personne B gagnent 5€ chacun. Si la Personne A choisit l'action A1 et la Personne B choisit l'action B2, alors la Personne A et la Personne B gagnent 0€ chacun.", ), dict( name='Pareto1_02', solution=3, explanation="La réponse choisie est incorrecte. La bonne réponse est 'La Personne A gagne 0€ si la Personne B choisit l'action B1, et 1€ si la Personne B choisit l'action B2'. Notez que les gains des deux personnes dépendent des actions choisies par la Personne A et la Personne B. Les gains dans tous les cas possibles sont spécifiés dans les instructions ci-dessus. Si la Personne A choisit l'action A2 et la Personne B choisit l'action B1, alors la Personne A et la Personne B gagnent 0€ chacun. Si la Personne A choisit l'action A2 et la Personne B choisit l'action B2, alors la Personne A et la Personne B gagnent 1€ chacun.", ), ] def get_quiz_dataPareto2(): return [ dict( name='Pareto2_01', solution=2, explanation="La réponse choisie est incorrecte. La bonne réponse est 'La Personne A gagne 3€ si la Personne B choisit l'action B1, et 0€ si la Personne B choisit l'action B2'. Notez que les gains des deux personnes dépendent des actions choisies par la Personne A et la Personne B. Les gains dans tous les cas possibles sont spécifiés dans les instructions ci-dessus. Si la Personne A choisit l'action A1 et la Personne B choisit l'action B1, alors la Personne A et la Personne B gagnent 3€ chacun. Si la Personne A choisit l'action A1 et la Personne B choisit l'action B2, alors la Personne A et la Personne B gagnent 0€ chacun.", ), dict( name='Pareto2_02', solution=3, explanation="La réponse choisie est incorrecte. La bonne réponse est 'La Personne A gagne 0€ si la Personne B choisit l'action B1, et 1€ si la Personne B choisit l'action B2'. Notez que les gains des deux personnes dépendent des actions choisies par la Personne A et la Personne B. Les gains dans tous les cas possibles sont spécifiés dans les instructions ci-dessus. Si la Personne A choisit l'action A2 et la Personne B choisit l'action B1, alors la Personne A et la Personne B gagnent 0€ chacun. Si la Personne A choisit l'action A2 et la Personne B choisit l'action B2, alors la Personne A et la Personne B gagnent 1€ chacun.", ), ] def get_quiz_dataKonowA(): return [ dict( name='KonowA1', solution=3, explanation="La réponse choisie est incorrecte. La bonne réponse est 'La Personne A et la Personne B ont effectué une tâche qui a duré 30 minutes. La Personne A divise l'argent gagné par la Personne A et la Personne B entre la Personne A et la Personne B. Notez que la Personne A et la Personne B ont toutes deux participé à la tâche. Ensuite, la Personne A divise l'argent gagné par les deux personnes.", ), dict( name='KonowA2', solution=2, explanation= "La réponse choisie est incorrecte. La bonne réponse est 'Dans la première étape, la Personne A a gagné plus d'argent que la Personne B parce que la Personne A a été assignée au hasard à un paiement plus élevé par réponse correcte que la Personne B'. La Personne A et la Personne B ont toutes deux répondu correctement à 20 tableaux. Ensuite, la seule différence dans le montant gagné est que la Personne A a été assignée à un paiement plus élevé par réponse correcte. " ), ] def get_quiz_dataKonowB(): return [ dict( name='KonowB1', solution=3, explanation="La réponse choisie est incorrecte. La bonne réponse est 'La Personne A et la Personne B ont effectué une tâche qui a duré 30 minutes. La Personne A divise l'argent gagné par la Personne A et la Personne B entre la Personne A et la Personne B'. Notez que la Personne A et la Personne B ont toutes deux participé à la tâche. Ensuite, la Personne A divise l'argent gagné par les deux personnes.", ), dict( name='KonowB2', solution=1, explanation="La réponse choisie est incorrecte. La bonne réponse est 'Dans la première étape, la Personne A a gagné plus d'argent que la Personne B parce que la Personne A a répondu correctement à plus de tables'. Notez que la Personne A a répondu correctement à 32 tableaux tandis que la Personne B a répondu correctement à 8 tableaux. ", ), ] def get_quiz_dataEarnR(): return [ dict( name='EarnR1', solution=3, explanation="La réponse choisie est incorrecte. La bonne réponse est 'La Personne B a accompli une tâche qui a duré 30 minutes. La Personne A divise le montant gagné par la Personne B.' La Personne B gagne 10€ en participant à une tâche qui a duré 30 minutes. Ensuite, la Personne A divise les 10€ gagnés par la Personne B entre il/elle et la Personne B.", ), dict( name='EarnR2', solution=3, explanation="La réponse choisie est incorrecte. La bonne réponse est 'La Personne A gagne 7 € et la Personne B gagne 3 €'. Rappelez-vous que la Personne A divise les 10 € gagnés par la Personne B. Par conséquent, si la Personne A donne 3 € à la Personne B, la Personne A gagne (10 - 3) = 7 € et la Personne B gagne 3 €.", ), dict( name='EarnR3', solution=1, explanation="La réponse choisie est incorrecte. La bonne réponse est 'La Personne A gagne 3 € et la Personne B gagne 7 €'. Rappelez-vous que la Personne A divise les 10 € gagnés par la Personne B. Par conséquent, si la Personne A donne 7 € à la Personne B, la Personne A gagne (10 - 7) = 3 € et la Personne B gagne 7 €. ", ) ] def get_quiz_dataEarnD(): return [ dict( name='EarnD1', solution=2, explanation="La réponse choisie est incorrecte. La bonne réponse est 'La Personne A a effectué une tâche qui a duré 30 minutes. La Personne A divise le montant gagné par la Personne A.' La Personne A gagne 10€ en participant à une tâche qui a duré 30 minutes. La Personne B n'a pas eu l'occasion de gagner de l'argent. Ensuite, la Personne A divise les 10€ qu'il/elle a gagnés entre elle et la Personne B.", ), dict( name='EarnD2', solution=3, explanation="La réponse choisie est incorrecte. La bonne réponse est 'La Personne A gagne 7 € et la Personne B gagne 3 €'. Rappelez-vous que la Personne A divise les 10 € gagnés par la Personne A. Par conséquent, si la Personne A donne 3 € à la Personne B, la Personne A gagne (10 - 3) = 7 € et la Personne B gagne 3 €.", ), dict( name='EarnD3', solution=1, explanation="La réponse choisie est incorrecte. La bonne réponse est 'La Personne A gagne 3 € et la Personne B gagne 7 €'. Rappelez-vous que la Personne A divise les 10 € gagnés par la Personne A. Par conséquent, si la Personne A donne 7 € à la Personne B, la Personne A gagne (10 - 7) = 3 € et la Personne B gagne 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 = ['Âge', 'Genre', 'Nationalité', 'Études'] @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 = 'French_Exp/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 Moral3(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 @staticmethod def vars_for_template(player: Player): return dict(list=player.participant.vars['moral']) 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, Moral, Moral3, QuestionnaireRules, QuestionnaireAltruism1, QuestionnaireAltruism2, QuestionnaireRisk, QuestionnairePersonal, ResultsWaitPage, Results]