from otree.api import Currency as c, currency_range from ._builtin import Page, WaitPage from .models import Constants class Captcha(Page): pass class Start(Page): form_model = 'player' form_fields = ['prolific_id', #'reCaptcha' ] class GeneralOverview(Page): form_model = 'player' def vars_for_template(self): participation_fee = self.participant.payoff_plus_participation_fee() return{ 'participation_fee': participation_fee, } class TaskIntroduction(Page): pass class ControlQuestion(Page): form_model = 'player' form_fields = ['control_question'] def error_message(self, value): return self.player.set_error_message(value) class Correct(Page): timeout_seconds = 1 class InstructionsForCounting(Page): def before_next_page(self): import time # user has 5 minutes to complete as many pages as possible self.participant.vars['expiry'] = time.time() + 5 * 60 page_sequence = [Captcha, Start, GeneralOverview, TaskIntroduction, ControlQuestion, Correct, InstructionsForCounting, ]