from ._builtin import Page, WaitPage from otree.api import Currency as c, currency_range from .models import Constants class IntroWait(WaitPage): wait_for_all_groups = True class IntroInstructions(Page): pass class IntroInstructionsTask2(Page): def vars_for_template(self): return{'continuation_prob': self.player.continuation_prob, 'delta_limit': self.player.delta_limit, } class IntroInstructionsCq2(Page): form_model = 'player' form_fields = ['cq2_group_members', 'cq2_match_termination', 'cq2_cont_prob', 'cq2_within_matching', 'cq2_payoff_match_bothcoop', 'cq2_payoff_match_bothdef', 'cq2_payoff_match_sucker'] class IntroInstructionsTask2Recap(Page): def before_next_page(self): self.participant.vars['cq2_group_members'] = self.player.cq2_group_members self.participant.vars['cq2_match_termination'] = self.player.cq2_match_termination self.participant.vars['cq2_cont_prob'] = self.player.cq2_cont_prob self.participant.vars['cq2_within_matching'] = self.player.cq2_within_matching self.participant.vars['cq2_payoff_match_bothcoop'] = self.player.cq2_payoff_match_bothcoop self.participant.vars['cq2_payoff_match_bothdef'] = self.player.cq2_payoff_match_bothdef self.participant.vars['cq2_payoff_match_sucker'] = self.player.cq2_payoff_match_sucker def vars_for_template(self): return{'continuation_prob': self.player.continuation_prob, 'delta_limit': self.player.delta_limit, } page_sequence = [ IntroWait, IntroInstructions, IntroInstructionsTask2, IntroInstructionsCq2, IntroInstructionsTask2Recap ]