84 lines
2.3 KiB
Python
84 lines
2.3 KiB
Python
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['questionnaire_before'] == 1:
|
|
yield (pages.Bienvenue)
|
|
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_16': 1,
|
|
'q_16_a': 1,
|
|
'q_16_b': 1,
|
|
'q_17': 1,
|
|
'q_18': 1,
|
|
'q_19_p2': 1,
|
|
'q_20': 1,
|
|
})
|
|
yield (pages.Questionnaire2, {
|
|
'q_21':1,
|
|
'q_22_n':1,
|
|
'q_23':1,
|
|
'q_24':1,
|
|
'q_24_a':1,
|
|
'q_25':1,
|
|
'q_26_a':1,
|
|
'q_26_b':1,
|
|
'q_26_c':1,
|
|
'q_26_d':1,
|
|
'q_27_a':1,
|
|
'q_27_b':1,
|
|
'q_27_c':1,
|
|
'q_27_d':1,
|
|
'q_28_a':1,
|
|
'q_28_b':1,
|
|
'q_28_c':1,
|
|
'q_28_d':1,
|
|
'q_28_e':1,
|
|
'q_28_f':1,
|
|
'q_29_a':1,
|
|
'q_29_b':1,
|
|
'q_29_c':1,
|
|
'q_29_d':1,
|
|
'q_30':1,
|
|
'q_31':"blabla",
|
|
|
|
})
|
|
|
|
|
|
|