from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range ) import random author = 'Your name here' doc = """ Your app description """ class Constants(BaseConstants): name_in_url = 'complain_inter' players_per_group = 2 num_rounds = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass def make_field(label): return models.IntegerField( choices=[ [1, ''], [2, ''], [3, ''], [4, ''], [5, ''], ], label=label, widget=widgets.RadioSelect, ) def make_field2(label): return models.IntegerField( choices=[ [1, ''], [2, ''], [3, ''], [4, ''], [5, ''], [6, ''], [7, ''], ], label=label, widget=widgets.RadioSelect, ) def make_field3(label): return models.IntegerField( choices=[ [1, ''], [2, ''], [3, ''], [4, ''], [5, ''], [6, ''], ], label=label, widget=widgets.RadioSelect, ) class Player(BasePlayer): #Grit q1 = make_field("New ideas and projects sometimes distract me from previous ones") q2 = make_field("Setbacks don't discourage me. I don't give up easily") q3 = make_field("I often set a goal but later choose to pursue a different one") q4 = make_field("I am a hard worker") q5 = make_field("I have difficulty maintaining my focus on projects that take more than a few months to complete") q6 = make_field("I finish whatever I begin") q7 = make_field("My interests change from year to year") q8 = make_field("I am diligent. I never give up") q9 = make_field("I have been obsessed with a certain idea or project for a short time but later lost interest") #PassionAttainment a1 = make_field2("I am less passionate for my studies than I should be") a2 = make_field2("I often feel as if I have to be more passionate for my studies") a3 = make_field2("I frequently feel obliged to be more passionate for my studies than I currently am") #Agreeableness agr1 = make_field("Is compassionate, has a soft heart") agr2 = make_field("Is sometimes rude to others") agr3 = make_field("Assumes the best about people") agr4 = make_field("Can be cold and uncaring") agr5 = make_field("Is respectful, treats others with respect") agr6 = make_field("Tends to find fault with others") #Extraversion ext1 = make_field("Tends to be quiet") ext2 = make_field("Is dominant, acts as a leader") ext3 = make_field("Is full of energy") ext4 = make_field("Is outgoing, sociable") ext5 = make_field("Prefers to have others take charge") ext6 = make_field("Is less active than other people") #Ten Item Personality Inventory (TIPI) c1 = make_field2("Extroverted, enthusiastic") c2 = make_field2("Critical, quarrelsome") c3 = make_field2("Dependable, self-disciplined") c4 = make_field2("Anxious, easily upset") c5 = make_field2("Open to new experiences, complex") c6 = make_field2("Reserved, quiet") c7 = make_field2("Sympathetic, warm") c8 = make_field2("Disorganized, careless") c9 = make_field2("Calm, emotionally stable") c10 = make_field2("Conventional, uncreative") #Goal Achievement Framework d1 = make_field("My aim is to completely master the material presented in my classes") d2 = make_field("I am striving to understand the content of my courses as thoroughly as possible") d3 = make_field("My goal is to learn as much as possible") d4 = make_field("My aim is to avoid learning less than I possibly could") d5 = make_field("I am striving to avoid an incomplete understanding of the course material") d6 = make_field("My goal is to avoid learning less than it is possible to learn") d7 = make_field("My aim is to perform well relative to other students") d8 = make_field("I am striving to do well compared to other students") d9 = make_field("My goal is to perform better than the other students") d10 = make_field("My aim is to avoid doing worse than other students") d11 = make_field("I am striving to avoid performing worse than others") d12 = make_field("My goal is to avoid performing poorly compared to others") # Motive to Communicate Goal Pursuit e1 = make_field2("I talk about my successes because I want people to think highly of me") e2 = make_field2("When I let others know of my achievements, I am doing it to gain their praise") e3 = make_field2("I want to tell others about my successes because it raises my social status") e4 = make_field2("I talk about my accomplishments because it makes me feel superior") e5 = make_field2("I only talk about my aspirations or goals when it makes me look good") e6 = make_field2("I hope others can be motivated when I share about the failures that I have overcome") e7 = make_field2("I tell others about my failures so that they will not repeat the mistakes I made") e8 = make_field2("I talk about the challenges I face so that people are aware of the challenges in engaging in a particular task") e9 = make_field2("Sharing about my goals makes me feel more driven to see them through") e10 = make_field2("Telling someone about what I am working towards is the best way to get me motivated to achieve them.") e11 = make_field2("I tell others about my tasks to feel more committed to them") e12 = make_field2("I repeatedly talk about my goals to help me stay focused on them") e13 = make_field2("I talk to others about my frustrations because I just want to 'let off steam'") e14 = make_field2("I vent to help me put my frustrations behind me") e15 = make_field2("When I face an unexpected obstacle, I feel a need to vent to others about it") e16 = make_field2("When I tell others about my failures, I want to be comforted") e17 = make_field2("When I tell people about my struggles at work, I want them to encourage me") e18 = make_field2("I want my friends to express concern when I complain to them about my frustrations") e19 = make_field2("I share my failures with others to make them feel that they are important to me") e20 = make_field2("I talk to others about my failures because it makes me feel closer to them") e21 = make_field2("I share my successes with others to make them feel that they are important to me") e22 = make_field2("I hope people can offer their assistance when I tell them about my challenges") e23 = make_field2("When I share my frustrations with others, I am looking for guidance") e24 = make_field2("When I complain about my problems, I often hope that someone offers me a solution") e25 = make_field2("When I talk to others about my goals, I am interested to know if they share the same sentiments as me") e26 = make_field2("I tell others about my problems to find out if they share the same problems") e27 = make_field2("I talk to others to find out if they share similar views as me on how best to tackle a problem") #Implicit Theories of Intelligence g1 = make_field3("You have a certain amount of intelligence, and you can't really do much to change it") g2 = make_field3("Your intelligence is something about you that you can't change very much") g3 = make_field3("You can learn new things, but you can't really change your basic intelligence") g4 = make_field3("To be honest, you can't really change how intelligent you are") #Sense of Belonging h1 = make_field2("I feel I belong within my department") h2 = make_field2("I am confident I made the right decision in choosing my course major") h3 = make_field2("I am satisfied with my academic experience in NUS") h4 = make_field2("I feel comfortable in NUS") h5 = make_field2("People in NUS accept me") h6 = make_field2("I feel a strong sense of belonging to NUS") #Belonging Uncertainty i1 = make_field2("Sometimes I feel that I belong at NUS, and sometimes I feel that I don't belong") i2 = make_field2("When something bad happens, I feel that maybe I don't belong at NUS") i3 = make_field2("When something good happens, I feel that I really belong at NUS") #PANAS j1 = make_field("Interested") j2 = make_field("Distressed") j3 = make_field("Excited") j4 = make_field("Upset") j5 = make_field("Enthusiastic") j6 = make_field("Proud") j7 = make_field("Ashamed") j8 = make_field("Inspired") j9 = make_field("Nervous") j10 = make_field("Determined") j11 = make_field("Afraid") #Difficult/Effortful k1 = make_field2("It was distressing thinking about the academic challenges I face in university") k2 = make_field2("It was enjoyable to think about the academic difficulties I face in university") k3 = make_field2("Thinking about the academic challenges I face in university felt upsetting") k4 = make_field2("I felt reluctant to think about the academic challenges I face in university") #Clear n1 = make_field2("I have a clear understanding of how to improve my grades") n2 = make_field2("I am certain that I can perform better for my courses") n3 = make_field2("I have a better idea of how to address my academic difficulties") n4 = make_field2("I have a clearer plan on solving my academic challenges") #SelfEff o1 = make_field("I will be able to achieve most of the academic goals that I have set for myself") o2 = make_field("When facing difficult academic tasks, I am certain that I will accomplish them") o3 = make_field("In general, I think that I can achieve academic goals that are important to me") o4 = make_field("I believe I can succeed at almost any academic goal to which I set my mind.") o5 = make_field("I will be able to successfully overcome many academic challenges") o6 = make_field("I am confident that I can perform effectively on many different academic tasks") o7 = make_field("Compared to other people, I can do most academic tasks very well") o8 = make_field("Even when things are tough, I can perform quite well for my studies") #State Motivation sm1 = make_field2("I feel strongly motivated to study") sm2 = make_field2("I feel strongly motivated to put in more effort to improve my grades") #Meaning Making mm1 = make_field2("I understand very well what my academic grades mean to me") mm2 = make_field2("I have a strong understanding of what my NUS life should look like") mm3 = make_field2("I know very clearly where I am heading in life") mm4 = make_field2("I feel that the effort I invested in my studies have a purpose") #Epistemic Items ei1 = make_field2("The academic frustrations I am experiencing affects everyone in NUS") ei2 = make_field2("The academic frustrations I am experiencing affects me more so than it affects most other NUS students") ei3 = make_field2("Most other NUS students will be able to relate to my academic frustrations") ei4 = make_field2("People have little to no idea of the many academic challenges I need to overcome in NUS") #Autonomous Motivation am1 = make_field2("Because somebody else wants you to, or because you’ll get something from somebody if you do") am2 = make_field2("Because you would feel ashamed, guilty, or anxious if you didn’t - you feel that you ought to strive for this") am3 = make_field2("Because you really believe that it is an important goal to have - you endorse it freely and value it wholeheartedly") am4 = make_field2("Because it represents who you are and reflects what you value most in life") am5 = make_field2("Because of the fun and enjoyment which the goal will provide you - the primary reason is simply your interest in the experience itself") #Goal Difficulty gd1 = make_field2("The academic goals I have set for myself are extremely difficult to achieve") gd2 = make_field2("Achieving my academic goals will require a great amount of effort") gd3 = make_field2("It is going to be highly challenging to achieve my academic goals") #Brief Self-Control bs1 = make_field("I am good at resisting temptation") bs2 = make_field("I have a hard time breaking bad habits") bs3 = make_field("I am lazy") bs4 = make_field("I say inappropriate things") bs5 = make_field("I do certain things that are bad for me, if they are fun") bs6 = make_field("I refuse things that are bad for me") bs7 = make_field("I wish I had more self-discipline") bs8 = make_field("People would say that I have iron self-discipline") bs9 = make_field("Pleasure and fun sometimes keep me from getting work done") bs10 = make_field("I have trouble concentrating") bs11 = make_field("I am able to work effectively toward long-term goals") bs12 = make_field("Sometimes I can’t stop myself from doing something, even if I know it is wrong") bs13 = make_field("I often act without thinking through all the alternatives") #RatePart p1 = make_field2("My partner was very helpful") p2 = make_field2("My partner provided good emotional support") p3 = make_field2("It was comforting talking to my partner") p4 = make_field2("My partner provided good advice") p5 = make_field2("I like my partner") p6 = make_field2("I feel a strong bond with my partner") p7 = make_field2("I feel close to my partner") p8 = make_field2("I trust my partner") p9 = make_field2("I feel that my partner and I are quite similar") p10 = make_field2("My partner complains too much") p11 = make_field2("My partner is someone I should emulate") p12 = make_field2("I feel a strong sense of admiration towards my partner") p13 = make_field2("I feel a strong sense of envy towards my partner") p14 = make_field2("I believe my partner is doing well academically") p15 = make_field2("My partner has positive qualities that I can learn from") #RateSelf s1 = make_field2("I was very helpful to my partner") s2 = make_field2("I provided good emotional support to my partner") s3 = make_field2("My partner was comforted talking to me") s4 = make_field2("I provided good advice for my partner") s5 = make_field2("My partner likes me") s6 = make_field2("My partner feels a strong bond with me") s7 = make_field2("My partner feels close to me") s8 = make_field2("My partner trusts me") s9 = make_field2("My partner feels that we are quite similar") s10 = make_field2("I complain too much") s11 = make_field2("I am someone my partner should emulate") s12 = make_field2("My partner feels a strong sense of admiration towards me") s13 = make_field2("My partner feels a strong sense of envy towards me") s14 = make_field2("My partner believes I am doing well academically") s15 = make_field2("I have positive qualities that my partner can learn from") #Meaning r1 = make_field2("Performing well in university is important to me") r2 = make_field2("Academic success is meaningful to me") r3 = make_field2("Studying hard is beneficial for my future") #AttentionCheck attn1 = make_field("Please select strongly disagree for this statement") attn2 = make_field2("Please select somewhat disagree for this statement") #SenseCon sc1 = make_field2("There is little I can do to change many of the important things in my life") sc2 = make_field2("I often feel helpless in dealing with the problems of life") sc3 = make_field2("I can do just about anything I really set my mind to do") sc4 = make_field2("Other people determine most of what I can and cannot do") sc5 = make_field2("What happens in my life is often beyond my control") sc6 = make_field2("When I really want to do something, I usually find a way to succeed at it") sc7 = make_field2("There are many things that interfere with what I want to do") sc8 = make_field2("Whether or not I am able to get what I want is in my own hands") sc9 = make_field2("I have little control over the things that happen to me") sc10 = make_field2("There is really no way I can solve some of the problems I have") sc11 = make_field2("Sometimes I feel that I am being pushed around in life") sc12 = make_field2("What happens to me in the future mostly depends on me") #Self Report CAP CAP = models.FloatField(label="My current CAP score is:") ExCAP = models.FloatField(label="My anticipated CAP score at the end of my education at NUS is:") age = models.IntegerField(label="Your age:") gender = models.IntegerField( choices=[ [1, 'Male'], [2, 'Female'], ] ) SES = models.IntegerField( choices=[10, 9, 8, 7, 6, 5, 4, 3, 2, 1], label="", widget=widgets.RadioSelect ) YoS = models.IntegerField( choices=[ [1, "Year 1"], [2, "Year 2"], [3, "Year 3"], [4, "Year 4"], [5, "Year 5"] ], label="Year of Study", widget=widgets.RadioSelect ) CoS = models.StringField(label="Please state your course of study:") Matric = models.StringField(label="Matriculation No.:") Email = models.StringField(label="Email:") Susp = models.LongStringField(label="Were you suspicious about anything during the study? Write 'Nil' if you have none.") StudyInt1 = models.IntegerField(label="Number of hours:") StudyInt2 = models.IntegerField(label="Number of hours:")