#from otree.api import Currency as c, currency_range #from ._builtin import Page, WaitPage #from .models import Constants from otree.api import Currency as c, currency_range from ._builtin import Page, WaitPage from .models import Constants class Intro_1(Page): pass class Intro_2(Page): pass class Intro_instructions(Page): pass class Part1_instructions(Page): pass class Part1_instructions_cq1(Page): form_model = 'player' form_fields = ['cq1_income_gap_X', 'cq1_income_gap_Y', 'cq1_aggr_income_gap_X', 'cq1_aggr_income_gap_Y'] class Part1_play_dg1(Page): def is_displayed(self): return self.round_number == self.participant.vars['task_rounds']['DG1'] form_model = 'player' form_fields = ['decision_1'] class Part1_play_dg2(Page): def is_displayed(self): return self.round_number == self.participant.vars['task_rounds']['DG2'] form_model = 'player' form_fields = ['decision_2'] class Part1_play_dg3(Page): def is_displayed(self): return self.round_number == self.participant.vars['task_rounds']['DG3'] form_model = 'player' form_fields = ['decision_3'] class Questionnaire_intro(Page): pass class Questionnaire_part1(Page): form_model = 'player' form_fields = ['year_birth', 'gender', 'major_econ','major_other'] # if player.major_econ==True: # form_fields = ['year_birth', 'gender', 'major_econ'] # else: # form_fields = ['year_birth', 'gender', 'major_econ','major_other'] class Questionnaire_part2_big5(Page): form_model = 'player' form_fields = ['CFC{}'.format(i) for i in range(1,11)] # def before_next_page(self): # if self.timeout_happened: # self.player.CFC1 = random.choice(range(1,8)) # self.player.CFC2 = random.choice(range(1,8)) #class Results(Page): # pass page_sequence = [ Intro_1, Intro_2, Intro_instructions, Part1_instructions, Part1_instructions_cq1, Part1_play_dg1, Part1_play_dg2, Part1_play_dg3, Questionnaire_intro, Questionnaire_part1, Questionnaire_part2_big5 ] #class MyPage(Page): # pass #class ResultsWaitPage(WaitPage): # def after_all_players_arrive(self): # pass #class Results(Page): # pass #page_sequence = [MyPage, ResultsWaitPage, Results]