from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range ) author = 'Your name here' doc = """ Your app description """ class Constants(BaseConstants): name_in_url = 'assessment' players_per_group = None num_rounds = 1 choices_ind = ["A", "B", "C", "D", "E"] correct_ind = ["B", "A", "E", "D", "E", "A", "C", "C", "B", "A", "B", "C", "C", "D", "E", # "C", "B", "B", "B", "A","C" ] choices_ded = ["Stimmt", "Stimmt nicht", "Kann man auf Grundlage der Informationen nicht eindeutig sagen"] correct_ded = ["Stimmt nicht", "Stimmt", "Kann man auf Grundlage der Informationen nicht eindeutig sagen", "Stimmt nicht", "Stimmt nicht", "Stimmt nicht", "Stimmt", "Stimmt"] correct_ccat = [#"K", "D", #4, "Bein", #"3km/h", "rechts", 0, 144, "K", 11, ] timelimit_ind = len(correct_ind) numberofquestions_ind = len(correct_ind) timelimit_ded = len(correct_ded) numberofquestions_ded = len(correct_ded) timelimit_ccat = len(correct_ccat) numberofquestions_ccat = len(correct_ccat) numberofquestions_total = numberofquestions_ccat + numberofquestions_ded + numberofquestions_ind piecerate = 25 maxwin = c(piecerate * (numberofquestions_ind + numberofquestions_ded + numberofquestions_ccat) / 100) class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): def is_correct(self, a,b): x=0 for i in range(0,len(a)): if a[i] == b[i]: x += 1 return x num_correct_ind = models.IntegerField(initial=0) num_correct_ded = models.IntegerField(initial=0) num_correct_ccat = models.IntegerField(initial=0) ind2 = models.CharField(initial = None, blank = True, choices = Constants.choices_ind, verbose_name="""""") ind3 = models.CharField(initial = None, blank = True, choices = Constants.choices_ind, verbose_name="""""") ind4 = models.CharField(initial = None, blank = True, choices = Constants.choices_ind, verbose_name="""""") ind5 = models.CharField(initial = None, blank = True, choices = Constants.choices_ind, verbose_name="""""") ind6 = models.CharField(initial = None, blank = True, choices = Constants.choices_ind, verbose_name="""""") ind7 = models.CharField(initial = None, blank = True, choices = Constants.choices_ind, verbose_name="""""") ind8 = models.CharField(initial = None, blank = True, choices = Constants.choices_ind, verbose_name="""""") ind9 = models.CharField(initial = None, blank = True, choices = Constants.choices_ind, verbose_name="""""") ind10 = models.CharField(initial = None, blank = True, choices = Constants.choices_ind, verbose_name="""""") ind11 = models.CharField(initial = None, blank = True, choices = Constants.choices_ind, verbose_name="""""") ind12 = models.CharField(initial = None, blank = True, choices = Constants.choices_ind, verbose_name="""""") ind13 = models.CharField(initial = None, blank = True, choices = Constants.choices_ind, verbose_name="""""") ind14 = models.CharField(initial = None, blank = True, choices = Constants.choices_ind, verbose_name="""""") ind15 = models.CharField(initial = None, blank = True, choices = Constants.choices_ind, verbose_name="""""") ind16 = models.CharField(initial = None, blank = True, choices = Constants.choices_ind, verbose_name="""""") # ind17 = models.CharField(initial = None, blank = True, choices = Constants.choices_ind, verbose_name="""""") # ind18 = models.CharField(initial = None, blank = True, choices = Constants.choices_ind, verbose_name="""""") # ind19 = models.CharField(initial = None, blank = True, choices = Constants.choices_ind, verbose_name="""""") # ind20 = models.CharField(initial = None, blank = True, choices = Constants.choices_ind, verbose_name="""""") # ind21 = models.CharField(initial = None, blank = True, choices = Constants.choices_ind, verbose_name="""""") # ind22 = models.CharField(initial = None, blank = True, choices = Constants.choices_ind, verbose_name="""""") ded1 = models.CharField(initial = None, blank = True, choices = Constants.choices_ded, verbose_name="""""") ded2 = models.CharField(initial = None, blank = True, choices = Constants.choices_ded, verbose_name="""""") ded3 = models.CharField(initial = None, blank = True, choices = Constants.choices_ded, verbose_name="""""") ded4 = models.CharField(initial = None, blank = True, choices = Constants.choices_ded, verbose_name="""""") ded5 = models.CharField(initial = None, blank = True, choices = Constants.choices_ded, verbose_name="""""") ded6 = models.CharField(initial = None, blank = True, choices = Constants.choices_ded, verbose_name="""""") ded7 = models.CharField(initial = None, blank = True, choices = Constants.choices_ded, verbose_name="""""") ded8 = models.CharField(initial = None, blank = True, choices = Constants.choices_ded, verbose_name="""""") # ccat1 = models.CharField(initial = None, blank = True, # choices = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L"], verbose_name="""""") ccat2 = models.CharField(initial = None, blank = True, choices = ["A", "B", "C", "D", "E",], verbose_name="""""") # ccat3 = models.IntegerField(initial = None, blank = True, # choices = [1, 2, 3, 4, 5, 6], verbose_name="""""") ccat4 = models.CharField(initial = None, blank = True, choices = ["Finger", "Zehen", "Bein", "Knöchel", "Schuh"], verbose_name="""""") # ccat5 = models.CharField(initial = None, blank = True, # choices = ["1 km/h", "2km/h", "3km/h", "4km/h", "5km/h", "6km/h",], verbose_name="""""") ccat6 = models.CharField(initial = None, blank = True, choices = ["links", "mitte", "rechts"], verbose_name="""""") ccat7 = models.IntegerField(initial = None, blank = True, choices = [0,3,6,12,14], verbose_name="""""") ccat8 = models.IntegerField(initial = None, blank = True, choices = [100, 121, 144, 169, 196], verbose_name="""""") ccat9 = models.CharField(initial = None, blank = True, choices = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L"], verbose_name="""""") ccat10 = models.IntegerField(initial = None, blank = True, choices = [7,8,9,10,11], verbose_name="""""")