from otree.api import Currency as c, currency_range from ._builtin import Page, WaitPage from .models import Constants class Start_Test(Page): #This is introduction of the understanding test. pass class Q1(Page): #The questions on this page are all about matching protocol and number of repetitions form_model = 'player' form_fields = ['Problem_Q1A','Problem_Q1B'] def error_message(self, values): if values['Problem_Q1A'] != 550 or values['Problem_Q1B'] != 1000: return '回答に少なくとも1つ誤りがあります。ヒント:【ルール説明を表示する/しない】を押して、利得計算の内容を確認してください。' class Q1_A(Page): pass class Q2(Page): #The questions on this page are all about decision making task in each round form_model = 'player' form_fields = ['Problem_Q2A', 'Problem_Q2B'] def error_message(self, values): if values['Problem_Q2A'] != 375 or values['Problem_Q2B'] != '1': return '回答に少なくとも1つ誤りがあります。ヒント:【ルール説明を表示する/しない】を押して、「投資選択について」内のポイントに関する項目を確認してください。' class Q2_A(Page): pass class Final_Test(Page): #This page announces the end of the understanding test & connects to the next decision making task pass page_sequence = [Start_Test, Q1,Q1_A, Q2,Q2_A,Final_Test ]