#1
by
LIDONGDONG
Hi all, I have an issue where participant.payoff was calculated incorrectly in my experiment. The correct payoff values are already stored in the data (for example at the player level), but participant.payoff is currently higher than it should be. The experiment was run using create session for MTurk, and I plan to use the Pay via MTurk function in oTree. However, the sessions are already completed. I would like to ask whether it is possible to modify participant.payoff for completed sessions, so that I can proceed with payment using the corrected values. What would be the recommended way to do this? Thank you.
#2
by
ccrabbe
Hi Lidongdong - I'm not sure if this is the recommended way, but I can think of two ways to access participant.payoff after a session iss over: (1) implement an admin_report: https://otree.readthedocs.io/en/latest/admin.html#admin-reports Essentially this gives you the vars_for_admin_report as a hook accessible from the oTree session admin interface, inside of which you can do what you need to do to participant.payoff. When you implement that function and add an admin_report.html to your app, a "Report" tab appears on the session admin interface and the function will run every time you load that tab (2) implement a custom_export report for your app: https://otree.readthedocs.io/en/latest/admin.html#custom-data-exports This will give you the cusstom_export function as a hook, where you can edit your payoffs. This one is triggered every time you download the app_name (custom_export) report from the main oTree Data tab. Good luck! Thanks, --Chris