from otree.api import Currency as c, currency_range from ._builtin import Page, WaitPage from .models import Constants import random ############################################################ # WELCOME ############################################################ class Intro(Page): pass class Instructions(Page): pass ############################################################ # SEQUENTIAL PD ############################################################ class Question(Page): form_model = 'player' form_fields = ['comp_score', 'open_score1', 'consc_score1', 'agree_score1', 'neuro_score1', 'extra_score1', 'open_score2', 'consc_score2', 'agree_score2', 'neuro_score2', 'extra_score2', 'open_score3', 'consc_score3', 'agree_score3', 'neuro_score3', 'extra_score3', 'risk_score', 'gender', 'impatience', 'home_language', 'state_birth', 'age', 'reci_', 'reci_2'] random.shuffle(form_fields) ############################################################ # REPAYMENT DECISIONS ############################################################ class Decision(Page): form_model = 'player' form_fields = ['fm_no_aid', 'fm_human_pos', 'fm_human_neg', 'fm_ai_pos', 'fm_ai_neg'] ############################################################ # REPAYMENT DECISIONS ############################################################ class Beliefs(Page): form_model = 'player' form_fields = ['belief_no_aid', 'belief_human_pos', 'belief_human_neg', 'belief_ai_pos', 'belief_ai_neg'] ############################################################ # REPAYMENT DECISIONS ############################################################ class AccBeliefs(Page): form_model = 'player' form_fields = ['belief_ai', 'belief_exp'] ############################################################ # BELIEF FIRST MOVER DECISIONS ############################################################ class Results(Page): def vars_for_template(self): return dict(income=1) ############################################################ # SEQUENCE OF PAGES ############################################################ # Question, page_sequence = [ Intro, Question, Instructions, Decision, Beliefs, AccBeliefs, Results]