from otree.api import * doc = """ Your app description """ class C(BaseConstants): NAME_IN_URL = 'welcome' PLAYERS_PER_GROUP = None NUM_ROUNDS = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass def make_likert7(label): return models.IntegerField(label=label, choices=[1, 2, 3, 4, 5, 6, 7], widget=widgets.RadioSelect) class Player(BasePlayer): consent_agree = models.StringField( choices=['I Agree'], label='', widget=widgets.RadioSelect, ) sjt1 = make_likert7('In general, you find society to be fair') sjt2 = make_likert7('In general, the Irish political system operates as it should') sjt3 = make_likert7('Irish society needs to be radically restructured') sjt4 = make_likert7('Ireland is the best country in the world to live in') sjt5 = make_likert7('Most policies serve the greater good') sjt6 = make_likert7('Everyone has a fair shot at wealth and happiness') sjt7 = make_likert7('Our society is getting worse every year') sjt8 = make_likert7('Society is set up so that people usually get what they deserve') attention_check = make_likert7('To show that you are paying attention, please select ' '"Neither agree nor disagree" option as your answer') # PAGES class Consent(Page): form_model = 'player' form_fields = ['consent_agree'] class Questionnaire1(Page): form_model = 'player' form_fields = ['sjt1', 'sjt2', 'sjt3', 'sjt4', 'sjt5', 'sjt6', 'sjt7', 'sjt8','attention_check'] class Instructions1(Page): pass page_sequence = [Consent, Questionnaire1, Instructions1]