from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, ) # noinspection PyUnresolvedReferences import itertools author = 'Tibor Zingora' doc = """ Computer-simulated interaction plus questionnaire """ class Constants(BaseConstants): name_in_url = 'ASTE_minimal_groups' players_per_group = None num_rounds = 1 class Subsession(BaseSubsession): def creating_session(self): conflict = itertools.cycle(['con', 'non', 'ing']) for p in self.get_players(): p.conflict = next(conflict) class Group(BaseGroup): pass class Player(BasePlayer): conflict = models.StringField() age = models.IntegerField(label="How old are you?", min=5, max=100) hobby = models.StringField(label="Please name at least one hobby of your partner.") feedback = models.StringField( label="Please, could you tell us what did you think while you were participating in this study?") email = models.StringField(label="Would you like to exchange an email address with your interaction partner? If yes, please type your e-mail address below.", blank=True) fear = models.StringField(label="What is your partner’s biggest fear?") change = models.StringField(label="What would your partner like to change about him/herself?") partner_group = models.StringField(label="What group does you partner belong to?") INT_name = models.StringField(label="What is your name?") INT2 = models.StringField(label="Why do you study at the University of Hagen?") INT3 = models.StringField(label="What are your hobbies?") INT4 = models.StringField(label="If you could travel anywhere in the world, where would you go and why?") INT5 = models.StringField(label="If you could change one thing about yourself, what would that be?") INT6 = models.StringField(label="What drives you crazy about other people? ") INT7 = models.StringField(label="If you could have one wish granted, what would that be?") INT8 = models.StringField(label="Do you criticize financial traders for being overpaid but accept movie stars’ and football players’ salaries? Please explain. ") INT9 = models.StringField(label="What is one of your biggest fears?") INT10 = models.StringField(label="What is one thing about yourself that most people would consider surprising?") gender = models.IntegerField(label="What is your gender?", choices=[ [1, 'female'], [2, 'male'], [3, 'other'], [4, 'prefer not to say'], ],) debrief = models.IntegerField( choices=[[1, 'Ja, ich stimme der Verwendung meiner Angaben zu.'], [2, 'Nein, ich widerrufe meine Zustimmung zur Verwendung meiner Angaben.']], label="Wir würden uns freuen, wenn wir die von Ihnen gemachten Angaben, auch verwenden können.", widget=widgets.RadioSelect) consent = models.IntegerField( choices=[[1, 'Ja'], [2, 'Nein']], label="", widget=widgets.RadioSelect) consent1 = models.BooleanField(widget=widgets.CheckboxInput, label='Ja') consent2 = models.BooleanField(widget=widgets.CheckboxInput, label='Nein') serious = models.IntegerField(label="", choices=[ [1, 'Ich möchte ernsthaft teilnehmen und zur Datenerhebung beitragen.'], [2, 'Ich möchte mich nur durch die Seiten klicken und nicht zur Datenerhebung beitragen.'], ], widget=widgets.RadioSelect ) owngroup = models.IntegerField(label="Which group do you belong to?", choices=[ [1, 'group A'], [2, 'group B'], [3, 'group C'], ],) university = models.IntegerField(label="What university do you attend?", choices=[ [1, 'University of Hagen'], [2, 'Other German university'], [3, 'Other university outside of Germany'], [4, 'I am not a student'], ],) major = models.IntegerField(label="What is your major?", choices=[ [1, 'Psychology'], [2, 'Other'], [3, 'I am not a student'], ],) year = models.IntegerField(label="In which semester of your studies are you?", min=1, max=50) PT1 = models.IntegerField( choices=[ [1, ' '], [2, ' '], [3, ' '], [4, ' '], [5, ' '], ], widget=widgets.RadioSelectHorizontal, label="I enjoy talking to other people." ) PT2 = models.IntegerField( choices=[ [1, ' '], [2, ' '], [3, ' '], [4, ' '], [5, ' '], ], widget=widgets.RadioSelectHorizontal, label="I like to make plans." ) PT3 = models.IntegerField( choices=[ [1, ' '], [2, ' '], [3, ' '], [4, ' '], [5, ' '], ], widget=widgets.RadioSelectHorizontal, label="I want my actions and beliefs to be consistent." ) PT4 = models.IntegerField( choices=[ [1, ' '], [2, ' '], [3, ' '], [4, ' '], [5, ' '], ], widget=widgets.RadioSelectHorizontal, label="I am very organized." ) PT5 = models.IntegerField( choices=[ [1, ' '], [2, ' '], [3, ' '], [4, ' '], [5, ' '], ], widget=widgets.RadioSelectHorizontal, label="My heart usually rules my head." ) PT6 = models.IntegerField( choices=[ [1, ' '], [2, ' '], [3, ' '], [4, ' '], [5, ' '], ], widget=widgets.RadioSelectHorizontal, label="It is easy for me to make new friends." ) PT7 = models.IntegerField( choices=[ [1, ' '], [2, ' '], [3, ' '], [4, ' '], [5, ' '], ], widget=widgets.RadioSelectHorizontal, label="I like to appear logical and coherent." ) PT8 = models.IntegerField( choices=[ [1, ' '], [2, ' '], [3, ' '], [4, ' '], [5, ' '], ], widget=widgets.RadioSelectHorizontal, label="I work best when I work by myself." ) PT9 = models.IntegerField( choices=[ [1, ' '], [2, ' '], [3, ' '], [4, ' '], [5, ' '], ], widget=widgets.RadioSelectHorizontal, label="I hate it when some of my beliefs contradict each other." ) PT10 = models.IntegerField( choices=[ [1, ' '], [2, ' '], [3, ' '], [4, ' '], [5, ' '], ], widget=widgets.RadioSelectHorizontal, label="I am very realistic." ) IPF = models.IntegerField( choices=[ [1, ' '], [2, ' '], [3, ' '], [4, ' '], [5, ' '], ], widget=widgets.RadioSelectHorizontal, label="How much would you like to interact with your partner in the future?" ) IL = models.IntegerField( choices=[ [1, ' '], [2, ' '], [3, ' '], [4, ' '], [5, ' '], ], widget=widgets.RadioSelectHorizontal, label="Did you like the interaction?" ) IPL = models.IntegerField( choices=[ [1, ' '], [2, ' '], [3, ' '], [4, ' '], [5, ' '], ], widget=widgets.RadioSelectHorizontal, label="Did you like your interaction partner ?" ) GF = models.IntegerField( choices=[ [1, ' '], [2, ' '], [3, ' '], [4, ' '], [5, ' '], ], widget=widgets.RadioSelectHorizontal, label="How much would you like to interact with people from the same group as your partner?" ) AI1 = models.IntegerField( choices=[ [1, ' '], [2, ' '], [3, ' '], [4, ' '], [5, ' '], ], widget=widgets.RadioSelectHorizontal, label="How much would you like to interact with people from group A?" ) AI2 = models.IntegerField( choices=[ [1, ' '], [2, ' '], [3, ' '], [4, ' '], [5, ' '], ], widget=widgets.RadioSelectHorizontal, label="How much would you like to interact with people from group B?" ) AI3 = models.IntegerField( choices=[ [1, ' '], [2, ' '], [3, ' '], [4, ' '], [5, ' '], ], widget=widgets.RadioSelectHorizontal, label="How much would you like to interact with people from group C?" ) FI1 = models.IntegerField( choices=[ [1, ' '], [2, ' '], [3, ' '], [4, ' '], [5, ' '], ], widget=widgets.RadioSelectHorizontal, label="How much would you like to become friends with people from group A?" ) FI2 = models.IntegerField( choices=[ [1, ' '], [2, ' '], [3, ' '], [4, ' '], [5, ' '], ], widget=widgets.RadioSelectHorizontal, label="How much would you like to become friends with people from group B?" ) FI3 = models.IntegerField( choices=[ [1, ' '], [2, ' '], [3, ' '], [4, ' '], [5, ' '], ], widget=widgets.RadioSelectHorizontal, label="How much would you like to become friends with people from group C?" ) GA1 = models.IntegerField( choices=[ [1, ' '], [2, ' '], [3, ' '], [4, ' '], [5, ' '], ], widget=widgets.RadioSelectHorizontal, label="How much do you like group A? " ) GA2 = models.IntegerField( choices=[ [1, ' '], [2, ' '], [3, ' '], [4, ' '], [5, ' '], ], widget=widgets.RadioSelectHorizontal, label="How much do you like group B? " ) GA3 = models.IntegerField( choices=[ [1, ' '], [2, ' '], [3, ' '], [4, ' '], [5, ' '], ], widget=widgets.RadioSelectHorizontal, label="Group A and B?" ) PC1 = models.IntegerField( choices=[ [1, ' '], [2, ' '], [3, ' '], [4, ' '], [5, ' '], ], widget=widgets.RadioSelectHorizontal, label="Group B and C?" ) PC2 = models.IntegerField( choices=[ [1, ' '], [2, ' '], [3, ' '], [4, ' '], [5, ' '], ], widget=widgets.RadioSelectHorizontal, label="Group A and C?" ) PC3 = models.IntegerField( choices=[ [1, ' '], [2, ' '], [3, ' '], [4, ' '], [5, ' '], ], widget=widgets.RadioSelectHorizontal, label="How much do you like group C? " )