from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range ) author = 'Vera Willems' doc = """ Master's thesis experiment. """ class Constants(BaseConstants): name_in_url = 'studyvera' players_per_group = None num_rounds = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): def assign_names(self): print('Assigning names to chat ...') for p in self.get_players(): p.nicknames = p.participant.vars['player_name'] class Player(BasePlayer): # Manipulation checks and game-related questions # def gmq(x): return models.IntegerField( choices=[[1, 'Strongly disagree'], [2, 'Disagree'], [3, 'Neither agree nor disagree'], [4, 'Agree'], [5, 'Strongly agree']], label=x, widget=widgets.RadioSelect, blank=True) man1 = gmq('Other participants could see the New Product endorsements I made in the game.') man2 = gmq('During the task, I felt exposed.') exd1 = gmq('I felt free to do whatever I want.') exd2 = gmq('My New Product endorsements were impulsive.') exd3r = gmq('I felt like I was being judged by the other participants.') exd4 = gmq('I endorsed a New Product in each round quickly.') exd5r = gmq('When making my New Product endorsements, I felt limited by what other employees endorsed.') exd6r = gmq('I worried about making the wrong endorsement.') exd7r = gmq('I felt a pressure to conform to the majority.') exd8r = gmq('I thought a lot about the optimal New Product endorsement in each round.') nicknames = models.StringField() def abc(x): return models.IntegerField( choices=[[1, 'Less than once every three years'], [2, 'Every two to three years'], [3, 'Once a year'], [4, 'Two times a year' ], [5, 'More than two times a year']], label=x, widget=widgets.RadioSelect) filler1 = abc('On average, how often do you travel by airplane yourself?') filler2 = abc('On average, how often do you think the average fellow student in this room travels by airplane?') def xyz(x): return models.IntegerField( choices=[[1, 'Strongly disagree'], [2, 'Disagree'], [3, 'Neither agree or disagree'], [4, 'Agree'], [5, 'Strongly agree']], label=x, widget=widgets.RadioSelect) filler4 = xyz('We had enough time to discuss the opinion of every participant.') filler5 = xyz('We worked as a good team during this group discussion.') filler6 = xyz('I expressed my own opinion during this group discussion.') filler7 = xyz('I feel that I contributed 2 appropriate suggestions for tackling CO2 emissions.') manipchat1 = xyz('During the chat session, I felt that participants knew my messages came from me. ') manipchat2 = xyz('During the chat session, I felt exposed.') suggestion1 = models.LongStringField(label='Your first suggestion:') suggestion2 = models.LongStringField(label='Your second suggestion:') thoughtsa = models.LongStringField(label='Write down your thoughts about suggestion A:', blank=True) thoughtsb = models.LongStringField(label='Write down your thoughts about suggestion B:', blank=True) thoughtsc = models.LongStringField(label='Write down your thoughts about suggestion C:', blank=True) thoughtsd = models.LongStringField(label='Write down your thoughts about suggestion D:', blank=True) thoughtse = models.LongStringField(label='Write down your thoughts about suggestion E:', blank=True) IV1 = models.IntegerField(label='The financial difference between the cost of flying versus taking train is insignificant', choices=[[0,"True"], [1,"False"]], widget=widgets.RadioSelect) IV2 = models.IntegerField(label='The RUG is limiting the number of flights taken by staff by enforcing a 500km or 6 hour trip minimum requirement for flying]', choices=[[1,"True"],[0,"False"]], widget=widgets.RadioSelect) control1 = models.IntegerField(label='The stained glass windows portray Aletta Jacobs', choices=[[1,"True"],[0,"False"]], widget=widgets.RadioSelect) control2 = models.IntegerField(label='The tree of knowledge is found in the Harmoniecomplex', choices=[[0,"True"],[1,"False"]], widget=widgets.RadioSelect) pli1 = models.IntegerField(label='How concerned are you about climate change?', widget=widgets.RadioSelectHorizontal, choices=[1,2,3,4,5,6,7,8,9,10,11]) pli2 = models.IntegerField(label='How concerned do you think the average fellow student in this room is about climate change?', widget=widgets.RadioSelectHorizontal, choices=[1,2,3,4,5,6,7,8,9,10,11])