Author: Mark Johnson
MDL-81714 grades: Make large regrades asynchronous
Currently, large courses can take a long time to perform a full regrade.
This is currently handled with a progress bar to prevent frontend
timeouts while the regrade takes place. However, because it can take so
long a teacher may not want to wait with the page open for several
minutes, particularly if they are performing several operations that
trigger a regrade.
This adds a new async flag to grade_regrade_final_grades which is true
by default. Instead of performing the regrade immediately, this queues
an instance of \core\task\regrade_final_grades for the course, which
will be executed in the background.
It is advisable to always leave the async flag set true, except in the
following scenarios:
- Automated tests.
- The regrade_final_grades task which actually wants to do the
calculations immediately.
- When you have performed a check to determine that the regrade process
is unlikely to take a long time, for example there are only a small
number of grade items.
http://git.moodle.org/gw?p=moodle.git;a=commit;h=b746bcd186b2a352d252f038a8655652b83f0dd9
http://github.com/moodle/moodle/commit/b746bcd186b2a352d252f038a8655652b83f0dd9
+ 5.0 en [recalculatinggradesadhoc,core_grades]