mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
87d71ecf69
The grade settings page displays a message to inform users that weights have been adjusted if they did not previously add up to the required 100%. With the change to sometimes displaying a progress bar, whether the message is displayed must be calculated immediately after the regrade took place, and before the page redirects. I have added a callback with arguments to the regrade_if_required function which is called immediately after regrade has taken place (regardless of whether the progress bar is required). This callback modifies the PAGE URL such that the redirect message will be displayed after the redirect. This does not use the session as the message should only be displayed immediately after a change. If the user does not click on the continue button after the progress bar has been displayed, and comes back to the page later, this may be confusing.