from otree.api import * doc = """ Summary of payment information """ class Constants(BaseConstants): name_in_url = 'payment_info' players_per_group = None num_rounds = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): pass # PAGES class Results(Page): @staticmethod def vars_for_template(player): participant = player.participant return dict(payoff=round((participant.quiz_correct_answers / 4) + participant.payoff_self + participant.payoff_partner + participant.cascade_earnings + (participant.part_4_earnings / 4) + 5, 2), p2_payoff=participant.payoff_self + participant.payoff_partner, quiz_payoff=round(participant.quiz_correct_answers / 4, 2), p4_payoff=round(participant.part_4_earnings/4, 2)) page_sequence = [Results]