from otree.api import * doc = """ Show Total Results """ class C(BaseConstants): NAME_IN_URL = 'wb_norm_app_total_results' PLAYERS_PER_GROUP = None NUM_ROUNDS = 1 URL = "https://t1p.de/4jrqp" class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): pass # PAGES class MyPage(Page): pass class ResultsWaitPage(WaitPage): #wait_for_all_groups = True #auf alle Gruppen warten def vars_for_template(player: Player): return dict( body_text="Please wait, until you get forwarded to the final result page." ) class Results(Page): def vars_for_template(player: Player): #from otree.settings import POINTS_CUSTOM_NAME #POINTS_CUSTOM_NAME='' #todo In Pfund fix und wieviel an Bonus verdient wurde #mögliche Verluste ausgleichen losses = False if player.participant.payoff < cu(0): player.participant.payoff = cu(0) losses = True return dict( losses=losses, payoff_pounds = round (player.participant.payoff, 2), payoff_poundstotal = round(player.participant.payoff_plus_participation_fee(),2), group_donation=player.participant.vars['player_team_donation'] ) page_sequence = [Results]