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_inst = models.IntegerField( choices=[ [1, 'very poorly'], [2, ''], [3, ''], [4, ''], [5, 'very carefully'], ], widget=widgets.RadioSelect, label="How carefully did you read the instructions?" ) quality_att = models.IntegerField( choices=[ [1, 'very poorly'], [2, ''], [3, ''], [4, ''], [5, 'very carefully'], ], widget=widgets.RadioSelect, label="How much attention did you pay to study details?" ) quality_resp = models.IntegerField( choices=[ [1, 'very poorly'], [2, ''], [3, ''], [4, ''], [5, 'very carefully'], ], widget=widgets.RadioSelect, label="How carefully did you consider your responses?" ) 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?") conflict_report = models.StringField(label="", blank=True) partner_group = models.IntegerField(label="What group does your partner belong to?", choices=[ [1, 'group A'], [2, 'group B'], [3, 'group C'], ], widget=widgets.RadioSelect) INT_group = models.StringField(label="Which group do you belong to?") INT_lifestyle = models.StringField(label="What would be the perfect lifestyle for you?") INT_memmory = models.StringField(label="What is your happiest early childhood memory?") INT_stres = models.StringField(label="What is one thing happening in your life that makes you stressed out?") INT_never_done = models.StringField(label="What would be the perfect lifestyle for you?") INT_emo = models.StringField(label="What is one emotional experience you’ve had with a good friend?") 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?") INT_unknown = models.StringField(label="Tell your partner one thing about yourself that most people who already know you don’t know.") 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 or White British'], [2, 'Black or Black British'], [3, 'Asian or Asian British'], [4, 'Other'], [5, '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.RadioSelect, 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, 'Left school at 16 or younger with no qualifications (or with qualifications lower than O level)'], [2, 'Left school at 16 with O Levels or CSE equivalent'], [3, 'Left school at 17/18 with A Levels/GCSE (or equivalent) or vocational education (such as HNC/HND etc. completed instead of A levels) '], [4, 'Completed higher diploma below degree level (HND, HNC degree completed after finishing high school; other degrees below university level)'], [5, 'Completed first degree (BA/BSc, Bachelors)'], [6, 'Completed higher/postgraduate degree (MA, MSc, Masters, PhD etc.)'], [7, 'Don’t know '], [8, '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.') 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 would describe myself as being 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 thoughts 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 likely would you be friends with people from group A? " ) FI2 = models.IntegerField( choices=[ [1, ' '], [2, ' '], [3, ' '], [4, ' '], [5, ' '], ], widget=widgets.RadioSelectHorizontal, label="How likely would you be friends with people from group B? " ) FI3 = models.IntegerField( choices=[ [1, ' '], [2, ' '], [3, ' '], [4, ' '], [5, ' '], ], widget=widgets.RadioSelectHorizontal, label="How likely would you be friends with people from group C? " ) GA1 = models.IntegerField( choices=[ [1, ' '], [2, ' '], [3, ' '], [4, ' '], [5, ' '], ], widget=widgets.RadioSelectHorizontal, label="How much do you think you would like someone from Group A?" ) GA2 = models.IntegerField( choices=[ [1, ' '], [2, ' '], [3, ' '], [4, ' '], [5, ' '], ], widget=widgets.RadioSelectHorizontal, label="How much do you think you would like someone from Group B?" ) GA3 = models.IntegerField( choices=[ [1, ' '], [2, ' '], [3, ' '], [4, ' '], [5, ' '], ], widget=widgets.RadioSelectHorizontal, label="How much do you think you would 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?" )