from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range, ) from otreeutils.surveys import create_player_model_for_survey level_of_agree = [ (1, ''), (2, ''), (3, ''), (4, ''), (5, '') ] level_of_true = [ (1, ''), (2, ''), (3, ''), (4, ''), (5, '') ] level_of_familary = [ (1, ''), (2, ''), (3, ''), (4, ''), (5, '') ] level_of_agreement_1 = [ (1, 'I am willing to select a challenging assignment that I can learn a lot from'), (2, 'I often look for opportunities to develop new skills and knowledge'), (3, 'I enjoy challenging and difficult tasks where I will learn new skills'), (4, 'For me, development of my ability is important enough to take risks'), (5, 'I prefer to work in situations that require a high level of ability and talent') ] level_of_agreement_2 = [ (1, ' I make sure I define and understand the problem or opportunity'), (2, 'I consider the possible causes and consequences of the issue'), (3, 'I question the accuracy of a diagnosis before exploring possible solutions'), (4, 'I identify hidden and explicit assumptions about the matter'), (5, 'I discuss the problem or opportunity definition with multiple stakeholders'), (6, 'I consider the people who are affected and the overall context.') ] level_of_agreement_3 = [ (1, 'I draw on multiple sources of evidence prior to making a decision'), (2, 'I thoroughly consult multiple sources of evidence'), (3, 'I collect evidence from scientific studies performed by researchers and experts'), (4, 'I consult with applied scientific research'), (5, 'I consult with data collected within the organisation related to the problem'), (6, 'I perform or consult with pilot test results'), (7, 'I consult with experienced colleagues'), (8, 'I consult with experts in the field'), (9, 'I consult with the stakeholders involved within the organisation'), (10,'I consult with external stakeholders who will be affected such as clients and partner firms') ] level_of_agreement_4 = [ (1, '3.1 I critically evaluate the quality of evidence I use when making decisions'), (2, '3.2 I evaluate the trustworthiness of the evidence that informs my decisions'), (3, '3.3 I consider whether the evidence is likely to apply to our specific context.'), (4, '3.4 I evaluate the strength of the evidence supporting an effect on the desired outcomes'), (5, '3.5. I consider the biases and interests of the source of evidence'), (6, '3.6 I consider how the evidence was collected'), (7, '3.7 I consider the context in which the evidence was collected'), (8, '3.8 I question whether it is strong and reliable evidence'), ] level_of_agreement_8 = [ (1, "I don't like to have to do a lot of thinking."), (2, 'I try to avoid situations that require thinking in depth about something. '), (3, 'I prefer to do something that challenges my thinking abilities rather than something that requires little thought.'), (4, 'I prefer complex to simple problems.'), (5, 'Thinking hard and for a long time about something gives me little satisfaction.'), ] class Constants(BaseConstants): name_in_url = 'condition' players_per_group = None num_rounds = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): page19_answer = models.StringField(label='', blank=True) page21_answer = models.IntegerField() page22_answer = models.IntegerField() page23_answer = models.IntegerField() page24_answer = models.IntegerField() page25_answer = models.IntegerField() page26_answer = models.IntegerField() page27_answer = models.IntegerField() page28_answer = models.IntegerField() # count click times page19_1 = models.IntegerField(initial=0, blank=True) page19_2 = models.IntegerField(initial=0, blank=True) page19_3 = models.IntegerField(initial=0, blank=True) page19_4 = models.IntegerField(initial=0, blank=True) page19_5 = models.IntegerField(initial=0, blank=True) page19_6 = models.IntegerField(initial=0, blank=True) page19_7 = models.IntegerField(initial=0, blank=True) page19_8 = models.IntegerField(initial=0, blank=True) page21_1 = models.IntegerField(initial=0, blank=True) page21_2 = models.IntegerField(initial=0, blank=True) page21_3 = models.IntegerField(initial=0, blank=True) page21_4 = models.IntegerField(initial=0, blank=True) page21_5 = models.IntegerField(initial=0, blank=True) page21_6 = models.IntegerField(initial=0, blank=True) page21_7 = models.IntegerField(initial=0, blank=True) page21_8 = models.IntegerField(initial=0, blank=True) page22_1 = models.IntegerField(initial=0, blank=True) page22_2 = models.IntegerField(initial=0, blank=True) page22_3 = models.IntegerField(initial=0, blank=True) page22_4 = models.IntegerField(initial=0, blank=True) page22_5 = models.IntegerField(initial=0, blank=True) page22_6 = models.IntegerField(initial=0, blank=True) page22_7 = models.IntegerField(initial=0, blank=True) page22_8 = models.IntegerField(initial=0, blank=True) page23_1 = models.IntegerField(initial=0, blank=True) page23_2 = models.IntegerField(initial=0, blank=True) page23_3 = models.IntegerField(initial=0, blank=True) page23_4 = models.IntegerField(initial=0, blank=True) page23_5 = models.IntegerField(initial=0, blank=True) page23_6 = models.IntegerField(initial=0, blank=True) page23_7 = models.IntegerField(initial=0, blank=True) page23_8 = models.IntegerField(initial=0, blank=True) page24_1 = models.IntegerField(initial=0, blank=True) page24_2 = models.IntegerField(initial=0, blank=True) page24_3 = models.IntegerField(initial=0, blank=True) page24_4 = models.IntegerField(initial=0, blank=True) page24_5 = models.IntegerField(initial=0, blank=True) page24_6 = models.IntegerField(initial=0, blank=True) page24_7 = models.IntegerField(initial=0, blank=True) page24_8 = models.IntegerField(initial=0, blank=True) page25_1 = models.IntegerField(initial=0, blank=True) page25_2 = models.IntegerField(initial=0, blank=True) page25_3 = models.IntegerField(initial=0, blank=True) page25_4 = models.IntegerField(initial=0, blank=True) page25_5 = models.IntegerField(initial=0, blank=True) page25_6 = models.IntegerField(initial=0, blank=True) page25_7 = models.IntegerField(initial=0, blank=True) page25_8 = models.IntegerField(initial=0, blank=True) page26_1 = models.IntegerField(initial=0, blank=True) page26_2 = models.IntegerField(initial=0, blank=True) page26_3 = models.IntegerField(initial=0, blank=True) page26_4 = models.IntegerField(initial=0, blank=True) page26_5 = models.IntegerField(initial=0, blank=True) page26_6 = models.IntegerField(initial=0, blank=True) page26_7 = models.IntegerField(initial=0, blank=True) page26_8 = models.IntegerField(initial=0, blank=True) page27_1 = models.IntegerField(initial=0, blank=True) page27_2 = models.IntegerField(initial=0, blank=True) page27_3 = models.IntegerField(initial=0, blank=True) page27_4 = models.IntegerField(initial=0, blank=True) page27_5 = models.IntegerField(initial=0, blank=True) page27_6 = models.IntegerField(initial=0, blank=True) page27_7 = models.IntegerField(initial=0, blank=True) page27_8 = models.IntegerField(initial=0, blank=True) page28_1 = models.IntegerField(initial=0, blank=True) page28_2 = models.IntegerField(initial=0, blank=True) page28_3 = models.IntegerField(initial=0, blank=True) page28_4 = models.IntegerField(initial=0, blank=True) page28_5 = models.IntegerField(initial=0, blank=True) page28_6 = models.IntegerField(initial=0, blank=True) page28_7 = models.IntegerField(initial=0, blank=True) page28_8 = models.IntegerField(initial=0, blank=True) page30_q1 = models.IntegerField(label='My mental energy is running low', choices=level_of_true, widget=widgets.RadioSelectHorizontal) page30_q2 = models.IntegerField(label='Right now, it would take a lot of effort for me to concentrate on something', choices=level_of_true, widget=widgets.RadioSelectHorizontal) page30_q3 = models.IntegerField(label='I can’t absorb any more information', choices=level_of_true, widget=widgets.RadioSelectHorizontal) page30_q4 = models.IntegerField(label='', choices=level_of_agree, widget=widgets.RadioSelectHorizontal) page30_q5 = models.IntegerField(label='', choices=level_of_agree, widget=widgets.RadioSelectHorizontal) page30_q6 = models.IntegerField(label='', choices=level_of_agree, widget=widgets.RadioSelectHorizontal) page30_q7 = models.IntegerField(label='', choices=level_of_agree, widget=widgets.RadioSelectHorizontal) page30_q8 = models.IntegerField(label='', choices=level_of_agree, widget=widgets.RadioSelectHorizontal) page30_q9 = models.IntegerField(label='', choices=level_of_agree, widget=widgets.RadioSelectHorizontal) page30_q10 = models.IntegerField(label='', choices=level_of_agree, widget=widgets.RadioSelectHorizontal) page30_q11 = models.IntegerField(label='', choices=level_of_agree, widget=widgets.RadioSelectHorizontal) page30_q12 = models.IntegerField(label='', choices=level_of_agree, widget=widgets.RadioSelectHorizontal) page30_q13 = models.IntegerField(label='', choices=level_of_agree, widget=widgets.RadioSelectHorizontal) page30_q14 = models.IntegerField(label='', choices=level_of_agree, widget=widgets.RadioSelectHorizontal) page30_q15 = models.IntegerField(label='', choices=level_of_agree, widget=widgets.RadioSelectHorizontal) page30_q16 = models.IntegerField(label='', choices=level_of_agree, widget=widgets.RadioSelectHorizontal) page30_q17 = models.IntegerField(label='', choices=level_of_agree, widget=widgets.RadioSelectHorizontal) page30_q18 = models.IntegerField(label='', choices=level_of_agree, widget=widgets.RadioSelectHorizontal) page30_q19 = models.IntegerField(label='', choices=level_of_agree, widget=widgets.RadioSelectHorizontal) page30_q20 = models.IntegerField(label='', choices=level_of_agree, widget=widgets.RadioSelectHorizontal) total_points = models.IntegerField(initial=0, blank=True) page19_pre_end = models.StringField(label='') page19_focus_time = models.StringField(label='') page21_pre_end = models.StringField(label='') page21_focus_time = models.StringField(label='') page22_pre_end = models.StringField(label='') page22_focus_time = models.StringField(label='') page23_pre_end = models.StringField(label='') page23_focus_time = models.StringField(label='') page24_pre_end = models.StringField(label='') page24_focus_time = models.StringField(label='') page25_pre_end = models.StringField(label='') page25_focus_time = models.StringField(label='') page26_pre_end = models.StringField(label='') page26_focus_time = models.StringField(label='') page27_pre_end = models.StringField(label='') page27_focus_time = models.StringField(label='') page28_pre_end = models.StringField(label='') page28_focus_time = models.StringField(label='') total_moves = models.IntegerField(initial=0, blank=True) game_success_times = models.IntegerField(initial=0, blank=True) game_pre = models.IntegerField(label='', choices=level_of_familary, widget=widgets.RadioSelectHorizontal) def get_game_timeout_seconds(self): return self.session.config.get('game_timeout_seconds', 120) def get_task_timeout_seconds(self): return self.session.config.get('task_timeout_seconds', 180) def get_enable_skip(self): return self.session.config.get('enable_skip', False)