# Definition of views/pages for the survey. # Please note: When using oTree 2.x, this file should be called "pages.py" instead of "views.py" # from otree.api import Currency as c, currency_range from . import models from ._builtin import Page, WaitPage from .models import Constants from otreeutils.surveys import SurveyPage, setup_survey_pages import time class SurveyIntro(Page): pass # let's create the survey pages here # unfortunately, it's not possible to create them dynamically class SurveyPage1(SurveyPage): # timeout_seconds = 120 debug_fill_forms_randomly = True # enable random data input if APPS_DEBUG is True class SurveyPage2(SurveyPage): # non-incentivized elicitation of time preferences # timeout_seconds = 120 debug_fill_forms_randomly = True # enable random data input if APPS_DEBUG is True class SurveyPage3(SurveyPage): # timeout_seconds = 120 debug_fill_forms_randomly = True # enable random data input if APPS_DEBUG is True class SurveyPage4(SurveyPage): # timeout_seconds = 120 debug_fill_forms_randomly = True # enable random data input if APPS_DEBUG is True class SurveyPage5(SurveyPage): # timeout_seconds = 120 debug_fill_forms_randomly = True # enable random data input if APPS_DEBUG is True class SurveyPage6(SurveyPage): # timeout_seconds = 120 debug_fill_forms_randomly = True # enable random data input if APPS_DEBUG is True class SurveyPage7(SurveyPage): # timeout_seconds = 120 debug_fill_forms_randomly = True # enable random data input if APPS_DEBUG is True class SurveyPage8(SurveyPage): # timeout_seconds = 120 debug_fill_forms_randomly = True # enable random data input if APPS_DEBUG is True class SurveyPage9(SurveyPage): # timeout_seconds = 120 debug_fill_forms_randomly = True # enable random data input if APPS_DEBUG is True class SurveyPage10(SurveyPage): # timeout_seconds = 120 debug_fill_forms_randomly = True # enable random data input if APPS_DEBUG is True class SurveyPage11(SurveyPage): # timeout_seconds = 120 debug_fill_forms_randomly = True # enable random data input if APPS_DEBUG is True class SurveyPage12(SurveyPage): # timeout_seconds = 120 debug_fill_forms_randomly = True # enable random data input if APPS_DEBUG is True class SurveyPage13(SurveyPage): # timeout_seconds = 120 debug_fill_forms_randomly = True # enable random data input if APPS_DEBUG is True # def before_next_page(self): # self.player.batting_averages_correct = self.player.batting_averages == 'Weak Correlation' # self.player.candidate_photo_correct = self.player.candidate_photo == 'left' # self.player.birth_gender_correct = self.player.birth_gender == '50%' # self.player.blue_cab_correct = self.player.blue_cab == '31%-50%' # self.player.most_likely_correct = self.player.most_likely == 'Drawing at least one red marble in seven tries, with replacement, from a bag containing 10 percent red marbles and 90 percent white marbles.' # self.player.least_likely_correct = self.player.least_likely == 'Drawing a red marble seven times in succession, with replacement (a selected marble is put back into the bag before the next marble is selected), from a bag containing 90 percent red marbles and 10 percent white marbles' # self.player.monty_hall_correct = self.player.monty_hall == 'switch' # self.player.hospital_babies_correct = self.player.hospital_babies == 'switch' # Create a list of survey pages. # The order is important! The survey questions are taken in the same order # from the SURVEY_DEFINITIONS in models.py survey_pages = [ SurveyPage1, SurveyPage2, SurveyPage3, SurveyPage4, SurveyPage5, SurveyPage6, SurveyPage7, SurveyPage8, SurveyPage9, SurveyPage10, SurveyPage11, SurveyPage12, SurveyPage13, ] # Common setup for all pages (will set the questions per page) setup_survey_pages(models.Player, survey_pages) # survey_pages.insert(1,CRTInfo) # survey_pages.insert(0,CRTInfo) page_sequence = [ # SurveyIntro, ] # add the survey pages to the page sequence list page_sequence.extend(survey_pages) # page_sequence.append(Consent)