from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, ) # noinspection PyUnresolvedReferences import itertools from django.db.models import DateTimeField 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): creation_time = DateTimeField(auto_now_add=True) 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() prolific = models.StringField(label="Please enter your Prolific ID.") age = models.IntegerField(label="How old are you? (Please, type a number)", min=5, max=100, blank=True) 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?") quality = models.IntegerField( choices=[ [1, 'very poor'], [2, ''], [3, ''], [4, ''], [5, 'very good'], ], widget=widgets.RadioSelect, label="Please, rate quality of your data." ) 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?") 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? ") INT6a = models.StringField(label="Its fairly easy, i think it is for many students at my university because its a small university and there are lots of opportunities to interact with other students in seminar and stuff.") 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?") INT9a = models.StringField(label="What is your most frightening early memory?") INT9c = models.StringField(label="What is one recent accomplishment that you are proud of?") 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'], ], widget=widgets.RadioSelect,) natio = models.StringField(label="What is your nationality?", blank=True) ethnic = models.IntegerField(label="What is your ethnicity?", widget=widgets.RadioSelect, choices=[ [1, 'White'], [2, 'Black'], [3, 'Hispanic'], [4, 'Asian'], [5, 'Other'], [6, 'Prefer not to say'], ],) language = models.IntegerField(label="Is English your first language? ", widget=widgets.RadioSelect, choices=[[1, 'Yes'], [2, 'No'], [3, 'Prefer not to say']],) Ident = models.IntegerField( choices=[ [1, 'not at all'], [2, ''], [3, ''], [4, ''], [5, 'very much'], ], widget=widgets.RadioSelectHorizontal, label="How strongly do you identify with your personality group?" ) Income = models.IntegerField( choices=[ [1, 'Under $5,000 '], [2, '$5,000-$10,000'], [3, '$10,001-$15,000 '], [4, '15,001-$25,000 '], [5, '$25,001-$35,000 '], [6, '$35,001-$50,000 '], [7, '$50,001-$65,000 '], [8, '65,001-$80,000 '], [9, '$80,001-$100,000 '], [10, 'Over $100,000 '], [11, 'Prefer not to say '], ], label="Please choose the category that describes the total amount of income you earned during the last year. Consider all forms of income, including salaries, tips, interest and dividend payments, scholarship support, student loans, parental support, social security, alimony, and child support, and others. " ) Religion = models.IntegerField( choices=[ [1, 'Christianity '], [2, 'Islam '], [3, 'Sikhism '], [4, 'Judaism '], [5, 'Buddhism '], [6, 'Hinduism '], [7, 'No religious affiliation '], [8, 'Atheist '], [9, 'Other '], [10, 'Prefer not to say '], ], widget=widgets.RadioSelect, label="What is your religious affiliation (if any)?" ) edu = models.IntegerField(label="What is the highest level of education you have completed? ", choices=[ [1, 'Less than High School '], [2, 'High school'], [3, 'Some college'], [4, '2 year degree'], [5, '4 year degree'], [6, 'Postgraduate/Professional degree or other'], [7, 'Prefer not to say'], ],widget=widgets.RadioSelect ) debrief = models.IntegerField( choices=[[1, 'Yes, I confirm the use of the data.'], [2, 'No, I retract my consent to use the data. ']], label="We would kindly like to ask you to confirm that we can use the data you provided.", widget=widgets.RadioSelect) consentF = models.BooleanField(widget=widgets.CheckboxInput, label='I certify that I am 18 years of age or over.') agree = models.BooleanField(widget=widgets.CheckboxInput, label='Yes, I agree to take part.') serious = models.IntegerField(label="", choices=[ [1, 'Yes, I want to participate seriously and contribute to the data collection.'], [2, 'No, I just want to click through the pages and do not want to contribute to data collection.'], ], widget=widgets.RadioSelect) owngroup = models.IntegerField(label="Which group do you belong to?", choices=[ [1, 'group A'], [2, 'group B'], [3, 'group C'], ], widget=widgets.RadioSelect) 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 would you like someone from group A? " ) GA2 = models.IntegerField( choices=[ [1, ' '], [2, ' '], [3, ' '], [4, ' '], [5, ' '], ], widget=widgets.RadioSelectHorizontal, label="How much would you like someone from group B? " ) GA3 = models.IntegerField( choices=[ [1, ' '], [2, ' '], [3, ' '], [4, ' '], [5, ' '], ], widget=widgets.RadioSelectHorizontal, label="How much would you like someone from group C?" ) PC1 = models.IntegerField( choices=[ [1, ' '], [2, ' '], [3, ' '], [4, ' '], [5, ' '], ], widget=widgets.RadioSelectHorizontal, label="Group A and B?" ) PC2 = models.IntegerField( choices=[ [1, ' '], [2, ' '], [3, ' '], [4, ' '], [5, ' '], ], widget=widgets.RadioSelectHorizontal, label="Group B and C?" ) PC3 = models.IntegerField( choices=[ [1, ' '], [2, ' '], [3, ' '], [4, ' '], [5, ' '], ], widget=widgets.RadioSelectHorizontal, label="Group A and C?" )