from otree.api import * c = cu doc = 'Kwestionariusz identyfikacji z grupą, kwestionariusz osobowy; całkowicie się zgadzam... pod każdym pytaniem' class Constants(BaseConstants): name_in_url = 'kwestionariusz_stare' players_per_group = 3 num_rounds = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): GW_belong = models.IntegerField(choices=[[1, 'całkowicie się nie zgadzam - 1'], [2, '2'], [3, '3'], [4, '4'], [5, '5'], [6, '6'], [7, '7 - całkowicie się zgadzam']], widget=widgets.RadioSelectHorizontal) GW_common = models.IntegerField(choices=[[1, '1'], [2, '2'], [3, '3'], [4, '4'], [5, '5'], [6, '6'], [7, '7']], widget=widgets.RadioSelectHorizontal) GW_liking = models.IntegerField(choices=[[1, '1- całkowicie się zgadzam'], [2, '2'], [3, '3'], [4, '4'], [5, '5'], [6, '6'], [7, '7 - całkowicie się zgadzam']], widget=widgets.RadioSelect) GW_close = models.IntegerField(choices=[[1, '1'], [2, '2'], [3, '3'], [4, '4'], [5, '5'], [6, '6'], [7, '7']], widget=widgets.RadioSelectHorizontal) GO_belong = models.IntegerField(choices=[[1, '1'], [2, '2'], [3, '3'], [4, '4'], [5, '5'], [6, '6'], [7, '7']], widget=widgets.RadioSelectHorizontal) GO_common = models.IntegerField(choices=[[1, '1'], [2, '2'], [3, '3'], [4, '4'], [5, '5'], [6, '6'], [7, '7']], widget=widgets.RadioSelectHorizontal) GO_liking = models.IntegerField(choices=[[1, '1'], [2, '2'], [3, '3'], [4, '4'], [5, '5'], [6, '6'], [7, '7']], widget=widgets.RadioSelectHorizontal) GO_close = models.IntegerField(choices=[[1, '1'], [2, '2'], [3, '3'], [4, '4'], [5, '5'], [6, '6'], [7, '7']], widget=widgets.RadioSelectHorizontal) rokU = models.IntegerField(label='Rok urodzenia', max=2003, min=1900) rokS = models.IntegerField(label='Rok studiów', max=9, min=1) TrybS = models.StringField(label='Tryb studiów') Kierunek = models.StringField(label='Kierunek studiów') Sex = models.IntegerField(choices=[[1, 'kobieta'], [2, 'mężczyzna']], label='Płeć', widget=widgets.RadioSelectHorizontal) class Grupa_wlasna(Page): form_model = 'player' form_fields = ['GW_belong', 'GW_common', 'GW_liking', 'GW_close'] class Grupa_obca(Page): form_model = 'player' form_fields = ['GO_belong', 'GO_common', 'GO_liking', 'GO_close'] class Ujawnienie_bonusy(Page): form_model = 'player' class Ankieta(Page): form_model = 'player' form_fields = ['rokU', 'rokS', 'TrybS', 'Kierunek', 'Sex'] class Podsumowanie(Page): form_model = 'player' @staticmethod def vars_for_template(player): participant = player.participant return dict( zarobil = participant.vars['Zarobki1']+participant.vars['Zarobki2']+participant.vars['Bonus1']+ participant.vars['Bonus2'], bonusy = participant.vars['Bonus1']+ participant.vars['Bonus2'] ) page_sequence = [Grupa_wlasna, Grupa_obca, Ujawnienie_bonusy, Ankieta, Podsumowanie]