from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range ) author = 'KIT - HRM uketr' doc = """ Final Version of the Survey for GiftExchange """ class Constants(BaseConstants): name_in_url = 'giftExchangeSurveyFinal' players_per_group = None num_rounds = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): answer1AWorker = models.FloatField() answer1AWorkerBool = models.BooleanField( blank=True ) answer1ALeader = models.FloatField() answer1ALeaderBool = models.BooleanField( blank=True ) answer1BWorker = models.FloatField() answer1BWorkerBool = models.BooleanField( blank=True ) answer1BLeader = models.FloatField() answer1BLeaderBool = models.BooleanField( blank=True ) answer2AWorker = models.FloatField() answer2AWorkerBool = models.BooleanField( blank=True ) answer2ALeader = models.FloatField() answer2ALeaderBool = models.BooleanField( blank=True ) answer2BWorker = models.FloatField() answer2BWorkerBool = models.BooleanField( blank=True ) answer2BLeader = models.FloatField() answer2BLeaderBool = models.BooleanField( blank=True ) def role(self): if self.id_in_group == 1: return 'leader' if self.id_in_group == 2: return 'worker'