from otree.api import * c = cu doc = '' class C(BaseConstants): NAME_IN_URL = 'BBBSurvey' PLAYERS_PER_GROUP = None NUM_ROUNDS = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): BBB = models.StringField(choices=[['Almost all chemical, physical, and biological functions can be transmitted by the functional components of biofunctional building blocks.', 'Almost all chemical, physical, and biological functions can be transmitted by the functional components of biofunctional building blocks.'], ['Biofunctional building blocks can only bind to organic materials, not to inorganic materials.', 'Biofunctional building blocks can only bind to organic materials, not to inorganic materials.'], ['Biofunctional building blocks consist of only one component that both binds and carries the function. ', 'Biofunctional building blocks consist of only one component that both binds and carries the function. '], ['Biofunctional building blocks cannot create new properties in materials, they can only enhance existing ones.', 'Biofunctional building blocks cannot create new properties in materials, they can only enhance existing ones.']], label='') BBBApp = models.LongStringField(blank=True, label='') Likert_table = models.StringField(widget=widgets.RadioSelect) Generate_likert_table = models.IntegerField(widget=widgets.RadioSelectHorizontal) Serendipity = models.StringField(blank=True, label='') End = models.LongStringField(label='') def custom_export(players): yield ['participant_code', 'id_in_group'] for p in players: pp = p.participant yield [pp.code, p.id_in_group] class BBB(Page): form_model = 'player' form_fields = ['BBB'] class BBBApp(Page): form_model = 'player' form_fields = ['BBBApp'] class Serendipity(Page): form_model = 'player' class End(Page): form_model = 'player' class Evaluation(Page): form_model = 'player' form_fields = ['Likert_table', 'Generate_likert_table'] @staticmethod def get_form_fields(player: Player): form_fields = ['likert_table'] return form_fields page_sequence = [BBB, BBBApp, Serendipity, End, Evaluation]