from otree.api import Currency as c, currency_range from ._builtin import Page, WaitPage from .models import Constants class Task2Instructions1(Page): pass class Task2Instructions2(Page): pass class Task2Instructions3(Page): pass class Quiz(Page): form_model = 'player' form_fields = ['quiz1', 'quiz2'] def error_message(self, values): if values["quiz1"] is None or values["quiz2"] is None: return "Please answer all the questions before proceed." elif values["quiz1"] != Constants.quiz1ans or values["quiz2"] != Constants.quiz2ans: return "You did not answer all the questions correctly. Please try again." class StartofExperiment(Page): pass class Task2_StartWaitPage(WaitPage): template_name = 'instruction_t2/MyWaitPage.html' wait_for_all_groups = True def after_all_players_arrive(self): pass page_sequence = [ Task2Instructions1, #Task2Instructions2, Task2Instructions3, Quiz, StartofExperiment, Task2_StartWaitPage, ]