from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range ) import random from random import randint author = 'Your name here' doc = """ Your app description """ class Constants(BaseConstants): name_in_url = 'MTurk_debriefing' players_per_group = None num_rounds = 1 pot = c(130) showupfee = c(50) class Subsession (BaseSubsession): pass class Group(BaseGroup): pass class Player (BasePlayer): #def role(self): # if self.id_in_group == 1: # return 'Decider' # if self.id_in_group == 2: # return 'Performer' Riskpreferences = models.IntegerField (min=0, max=100) #Overconfidence Overconfidence1 = models.IntegerField ( choices=[ [0, '51'], [1, '39'],], widget=widgets.RadioSelectHorizontal ) Overconfidence2 = models.IntegerField ( choices=[ [0, '21,305 km'], [1, '6,737 km'], ], widget=widgets.RadioSelectHorizontal ) Overconfidence3 = models.IntegerField ( choices=[ [0, '13'], [1, '17'],], widget=widgets.RadioSelectHorizontal ) Overconfidence4 = models.IntegerField ( choices=[ [0, '23'], [1, '39'], ], widget=widgets.RadioSelectHorizontal ) Overconfidence5 = models.IntegerField ( choices=[ [0, '5,872 km'], [1, '3,475 km'], ], widget=widgets.RadioSelectHorizontal ) Overconfidence6 = models.IntegerField ( choices=[ [0, '176,904 kg'], [1, '312,993 kg'], ], widget=widgets.RadioSelectHorizontal ) Overconfidence7 = models.IntegerField ( choices=[ [0, '1756'], [1, '1699'], ], widget=widgets.RadioSelectHorizontal ) Overconfidence8 = models.IntegerField ( choices=[ [0, '14 months '], [1, '22 months'], ], widget=widgets.RadioSelectHorizontal ) Overconfidence9 = models.IntegerField ( choices=[ [0, '9,588 km '], [1, '12,530 km'], ], widget=widgets.RadioSelectHorizontal ) Overconfidence10 = models.IntegerField ( choices=[ [0, '11,033 km '], [1, '4,521 km'], ], widget=widgets.RadioSelectHorizontal ) Overconfidence11 = models.IntegerField (min=0, max=10) #DemandAttribution DemandD = models.TextField( widget=widgets.Textarea (attrs={'rows': 1, 'cols': 8}), blank=True ) DemandP = models.TextField( widget=widgets.Textarea (attrs={'rows': 1, 'cols': 8}), blank=True ) AttributionP1 = models.IntegerField( choices=[ [1, 'Task 1'], [2, 'Task 2'], [3, 'Equally both'],] ) AttributionP2 = models.IntegerField( choices=[ [1, 'Mainly effort'], [2, 'Mainly ability'], [3, 'Equally both'],] ) AttributionP3 = models.IntegerField( choices=[ [1, 'Mainly effort'], [2, 'Mainly ability'], [3, 'Equally both'],] ) AttributionP4 = models.IntegerField( choices=[ [1, 'Task 1'], [2, 'Task 2'], [3, 'Equally both'],] ) AttributionP5 = models.IntegerField( choices=[ [1, 'Mainly effort'], [2, 'Mainly luck'], [3, 'Equally both'], ] ) AttributionP6 = models.IntegerField( choices=[ [1, 'Earth revolved around the sun'], [2, 'Majority of plants are green'], [3, 'Sun always rises in the east'], [4, 'Humans breathe in oxygen'], ] ) AttributionPE = models.IntegerField( choices=[ [1, 'Yes, very much'], [2, 'Yes, a little'], [3, 'No'],] ) AttributionD1 = models.IntegerField ( choices=[ [1, 'Task 1'], [2, 'Task 2'], [3, 'Equally both'], ] ) AttributionD2 = models.IntegerField ( choices=[ [1, 'Mainly effort'], [2, 'Mainly ability'], [3, 'Equally both'], ] ) AttributionD3 = models.IntegerField ( choices=[ [1, 'Mainly effort'], [2, 'Mainly ability'], [3, 'Equally both'], ] ) AttributionD4 = models.IntegerField ( choices=[ [1, 'Task 1'], [2, 'Task 2'], [3, 'Equally both'], ] ) AttributionD5 = models.IntegerField ( choices=[1, 2, 3, 4, 5, 6, 7]) AttributionDE = models.IntegerField( choices=[ [1, 'Yes, very much'], [2, 'Yes, a little'], [3, 'No'],] ) AttributionD6 = models.IntegerField ( choices=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16])