from otree.api import * c = cu doc = '' class C(BaseConstants): NAME_IN_URL = 'Instructions' PLAYERS_PER_GROUP = None NUM_ROUNDS = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): consent = models.StringField(label= "Escribe 'Acepto' a continuación para indicar que has leído las instrucciones anteriores y que tiene intención de responder de forma reflexiva y sincera.") class Consent(Page): form_model = 'player' def vars_for_template(player: Player): participant = player.participant participant.progress = 1 result = {'progress':participant.progress} return result def before_next_page(player: Player, timeout_happened): participant = player.participant participant.progress += 1 class Instructions(Page): form_model = 'player' form_fields = ['consent'] ##def vars_for_template(player: Player): ##participant = player.participant ##result = {'progress':participant.progress} ##return result def before_next_page(player: Player, timeout_happened): participant = player.participant participant.progress += 1 class Page1(Page): form_model = 'player' form_fields = ['likert1', 'likert2', 'likert3', 'likert4', 'likert5', 'likert6', 'likert7', 'likert8'] class Demographics(Page): form_model = 'player' form_fields = ['demog1', 'demog2', 'demog3', 'demog4', 'demog5', 'demog6', 'demog7', 'demog8', 'demog9', 'demog10', 'demog11'] class MyPage(Page): form_model = 'player' page_sequence = [Consent, Instructions]