-
Improvement
-
Resolution: Fixed
-
Minor
-
3.9.18, 3.11.11, 4.0, 4.0.5
-
MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
-
MOODLE_402_STABLE
-
MDL-72451_master -
We had a big performance issue in a quiz activity view page.
After some investigation, we found there was an issue in the grade calculation formula and the regrading process kept calculating each access.
In our case, the each calculation took more than 10 sec and many students accessed at once, so the site was overloaded.
When calculating regrade ("grade_regrade_final_grades" function) in the grades page and the gradeing has some errors, the system show the errors in the page and set 'needsupdate = 0' to avoid further error.
https://github.com/moodle/moodle/blob/206023c15f680b2b3b2aab4d36515337491e0edf/lib/gradelib.php#L393-L403
But in the quiz activity view page, the system doesn't set 'needsupdate = 0' and keep calculating regrade.
https://github.com/moodle/moodle/blob/206023c15f680b2b3b2aab4d36515337491e0edf/lib/gradelib.php#L448-L451
We can't see any errors in the quiz activity view page, so we don't know what's going on.
The calculation can't fix automatically, so it's better to show something error when the issue is happening.
- caused a regression
-
MDL-81809 Incorrect handling of regrade error
- Open
- is duplicated by
-
MDL-64681 Better handling of broken (needsupdate = 1) gradebook
- Closed
- will help resolve
-
MDL-55707 Possible to get in "recalculating grades" infinite loop
- Closed
-
MDL-64681 Better handling of broken (needsupdate = 1) gradebook
- Closed
-
MDL-51360 Full course grade recalculation can have huge impact on opening/closing quizzes
- Closed
-
MDL-72175 Improving performance of grade_item::regrade_final_grades
- Closed