from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range ) import random author = 'AS' doc = """ Transparency in Trust Game: survey """ class Constants(BaseConstants): name_in_url = 'trustGame_independentSurvey' players_per_group = None num_rounds = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass def make_field(label): return models.IntegerField( choices=[-2, -1, 0, 1, 2], label=label, widget=widgets.RadioSelect, ) class Player(BasePlayer): participant_vars_dump = models.CharField() def role(self): return {1: 'A', 2: 'B'}[self.id_in_group] ppt_post1 = make_field('I felt to get enough privacy in this setting.') ppt_post2 = make_field('I was comfortable with the amount of privacy I got.') ppt_post3 = make_field('I think my privacy was preserved during the interaction.') ppt_post4 = make_field('I think I was be very transparent myself.') ppt_post5 = make_field('I was concerned about my privacy as a participant in this setting.') pot_post1 = make_field('I got enough transparency from others in this setting.') pot_post2 = make_field('The level of transparency about the other participants\' behavior was high.') pot_post3 = make_field('The level of transparency about the other participants\' behavior was low.') pot_post4 = make_field('I felt comfortable with the amount of information I got.') pot_post5 = make_field('I felt to get a lot of transparency from others in this setting.') pot_post6 = make_field('I had the feeling that the entire setting was transparent.') intention1 = make_field('What others thought of me.') intention2 = make_field('If and how many ECUs the other person was going to send back.') intention3 = make_field('If people were able to identify me.') mc_1 = models.BooleanField( label="The amount of ECUs participant A would send to participant B is linked to his pseudonym.") mc_2 = models.BooleanField(label="Participant B would get 3 times the amount of ECUs that would have been sent by participant A.") mc_3 = models.BooleanField(label="Participant B would not have the chance to send ECUs back to participant A.") lvlTrans = models.StringField( choices=['lower than in the previous setting', 'equal to the previous setting', 'higher than in the previous setting'], label='I think, now the level of transparency is ...', widget=widgets.RadioSelect) cos_money = models.CurrencyField( label='How many ECUs would you send? (please enter an amount between 0 and 100)', min=0, max=100, ) tb1 = make_field('I have frequently been the victim of an improper invasion of my information privacy by someone.') tb2 = make_field('I keep my friends on social media updated about what is going on in my life.') tb3 = make_field('I provide detailed information about my daily life for my social media followers to see.') corona = make_field('Since the COVID-19 lock-down my online privacy concerns have decreased.') age = models.IntegerField( label='What is your age?', min=13, max=125) gender = models.StringField( choices=['Male', 'Female', 'Other'], label='What is your gender?', widget=widgets.RadioSelect) income = models.IntegerField( label="How much money do you have per month at your disposal after deducting all monthly costs?", min=0, max=100000) lvlEducation = models.StringField( choices=['less than high school', 'high school diploma', 'undergraduate degree', 'postgraduate degree', 'doctorial degree'], label='What is your highest level of education?', widget=widgets.RadioSelect) currencyP = models.StringField( label="Please enter the currency code for the amount of money you entered (e.g. EUR, USD ...).") feedback = models.LongStringField( label="This experiment is currently still in a testing phase. If there was anything that was unclear, please " "provide that here" )