I was torn between here and the upgrading forum, but chose here as it's quite grade specific.
We've very recently completed our upgrade of Moodle 4.0 -> 4.2.2 and generally all has gone well.
One thing we've noticed is that on a large number of our courses, when adding a graded course module (e.g. Assignment, Turnitintooltwo etc.), upon clicking "Save and return to course", we are immediately sent to the regrading page for the module (mod/xxx/modregrade.php), where the progress bar quickly completes and you can click 'continue' to head back to the course. This does not happen with every course (newly set up ones do not get this, for example). I was wondering why it's doing this and what we can do about it (if anything).
I've traced back through the code and DB tables myself but can't get to the root cause of it deciding that everything on a course needs regrading. It seems to receive "needsfrontendregrade" from the processed form which marks the grade_item as "needsupdate=true", but I can't work out what is telling it that it needsfrontendregrade.
Any help very much appreciated!
Richard
Re: Recalculating grades after upgrading Moodle
Did you ever get to the bottom of this as it is doing the same to me. Users are getting emails when recalculated and its causing much confusion.
In all honesty, our staff tend to steer clear of the gradebook due to it's complexities (but also because we push raw unweighted grades into our student records system - where weightings then take place), so I'd be surprised if the number of issues being reported are related to people having changed things in their gradebooks.
Good to know. I'm traveling at the moment but will see if I can check with my team post the Global Moot to see if they have any ideas. The gradebook setup has been improved in recent versions but the feedback on setup being complex is good feedback. I'm hoping longer term we can make that whole experience a lot more straightforward
The behaviour described was introduced in https://tracker.moodle.org/browse/MDL-75878 to improve the grade recalculation process triggered when a new gradable activity is created. This update specifically targets large courses, which were most affected by the previous method.
Previously, the activity creation and grade recalculation occurred in the same request. In large courses, this recalculation could take a significant amount of time and sometimes result in a time-out, causing the activity creation to fail as well.
Now, when a new gradable activity is created, a check is performed to determine if the recalculation process will be time-consuming - currently defined as courses with more than 100 grades. In such cases, the recalculation is handled in a separate request with a progress bar displayed. While the overall waiting time remains the same, this approach prevents users from being blocked from creating activities if the recalculation times out. For courses with fewer than 100 grades, the original approach - processing everything within a single request is still used. This explains the discrepancy in behaviour between different courses.
I hope this helps.
Thanks for taking the time to respond Mihail.
This is helpful to know! Thank you!
For clarification, is it determining the "more than 100 grades" criteria by number of students x grade items? For example, for one of our classes, they have a classlist of 26 students and, coincidentally, 26 grade items (600 + grade items). However, in this particular the course right now, the instructor has only issued 2 grades (26 x 2), so despite whether or not a grade has been issued, would it count all the grades and all the students in the recalculating?
Thanks again,
Marybeth