Test_Johanne/v2_exp_e4c_en_p1_quest/tests.py

82 lines
2.2 KiB
Python
Raw Normal View History

2025-03-06 10:28:01 +01:00
from otree.api import Currency as c, currency_range, Submission
from . import pages
from ._builtin import Bot
from .models import Constants
import random
# **********************************************************************************************************************
# *** BOT
# **********************************************************************************************************************
class PlayerBot(Bot):
def play_round(self):
if self.participant.vars['versionexp'] == 2:
yield (pages.Questionnaire0, {
'q_1': 1,
'q_2_a': 1,
'q_2_b': 1,
'q_2_c': 1,
'q_22': 1,
'q_2_e_a': 1,
'q_2_e_b': 1,
'q_2_e_c': 1,
'q_2_h': 1,
'q_3': 1,
'q_4': 1,
'q_5': 1,
'q_6': 1,
'q_7': 1,
'q_8': 1,
'q_9': 1,
'q_10': 1,
'q_11': 1,
})
yield (pages.Questionnaire1, {
'q_12': 1,
'q_13': 1,
'q_14': 1,
'q_15': 1,
'q_16': 1,
'q_17': 1,
'q_18': 1,
'q_19': 1,
'q_19_a': 1,
'q_19_b': 1,
'q_20': 1,
'q_21': 1,
'q_22_p2': 1,
'q_23': 1,
})
yield (pages.Questionnaire2, {
'q_24': 1,
'q_25': 1,
'q_26': 1,
'q_27': 1,
'q_27_a': 1,
'q_28': 1,
'q_29_a': 1,
'q_29_b': 1,
'q_29_c': 1,
'q_29_d': 1,
'q_30_a': 1,
'q_30_b': 1,
'q_30_c': 1,
'q_30_d': 1,
'q_30_e': 1,
'q_30_f': 1,
'q_31': 1,
'q_32': 1,
'q_33': 1,
})
yield (pages.Questionnaire3, {
'q_34_a': 1,
'q_34_b': 1,
'q_34_c': 1,
})
yield (pages.QuestionnaireEnd)