from otree.api import ( Page, WaitPage, models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range, ) class Constants(BaseConstants): name_in_url = 'survey' players_per_group = None num_rounds = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): name = models.StringField() bonus_points = models.StringField( choices=[['Prisoners Dilemma', 'Prisoners Dilemma'], ['Cooperation Game', 'Cooperation Game'], ['Stag-Hunt Game','Stag-Hunt Game']], label='What game would you like to have your bonus points from?', widget=widgets.RadioSelect, ) last_q = models.StringField( choices = [['TRUE', 'True'], ['FALSE', 'False']], label="This choice is another example of a one-shot simultaneous game.", widget= widgets.RadioSelect, ) # FUNCTIONS # PAGES class Question(Page): form_model = 'player' form_fields = ['name', 'gender'] page_sequence = [Demographics, CognitiveReflectionTest]