from otree.api import Currency as c, currency_range from ._builtin import Page, WaitPage from .models import Constants class Evaluation_Maze(Page): form_model = 'player' form_fields = ['answer_maze'] def vars_for_template(self): t = self.round_number round_text = Constants.List_Round_Text[t-1] item = Constants.List_item[t-1] gender_A = Constants.List_playerA[item-1]['gender'] social_class_A = Constants.List_playerA[item-1]['social_class'] pastime_A = Constants.List_playerA[item-1]['pastime'] height_A = Constants.List_playerA[item-1]['height'] score_A = Constants.List_playerA[item-1]['score'] round_A = Constants.List_playerA[item-1]['rounds'] gender_B = Constants.List_playerB[item-1]['gender'] social_class_B = Constants.List_playerB[item-1]['social_class'] pastime_B = Constants.List_playerB[item-1]['pastime'] height_B = Constants.List_playerB[item-1]['height'] score_B = Constants.List_playerB[item-1]['score'] round_B = Constants.List_playerB[item-1]['rounds'] return dict( round_text = round_text, gender_A = gender_A, social_class_A = social_class_A, pastime_A = pastime_A, height_A = height_A, score_A = score_A, round_A = round_A, gender_B = gender_B, social_class_B = social_class_B, pastime_B = pastime_B, height_B = height_B, score_B = score_B, round_B = round_B ) def before_next_page(self): self.player.set_payoff_maze() page_sequence = [Evaluation_Maze]