-
Bug
-
Resolution: Not a bug
-
Major
-
None
-
2.5.6, 2.6.3, 2.7
-
None
-
MOODLE_25_STABLE, MOODLE_26_STABLE, MOODLE_27_STABLE
Grades that are entered in via the Grader Report are initially locked or overridden but the grades are not correctly calculated in this case.
One of the solutions I found online (in Moodle forums) suggests running a query to set the overrides/locks to zero like this:
update mdl_grade_grades g
set locked = 0, overridden = 0
from mdl_grade_items i
where i.id = g.itemid and i.courseid = 104
This works but there is also a case where some of the instructors lock the gradebook in order to force calculation of the grades. This works in many cases as well,
as long as the instructor unlocks the gradebook to update the grades and then locks the gradebook again when updates are complete.
The combination of the two methods appears to be fatal to the grades entered via the Grader Report. If the lock/override exists, the data is persistent, but if they are set to zero,
the grades disappear.
The nearest I can tell is that the grades entered via the Grader Report are entered in the mdl_grade_grades and mdl_grade_items tables but NOT in the mdl_assign_grades table.
When the gradebook is locked and then unlocked, the grades seem to be verified against the mdl_assign_grades table and so if the grade is missing from that table, the grades
in the mdl_grade_grades table are overwritten with the null grades (if they do not have locks/overrides).
One way I can eliminate this problem is with a query like this:
update mdl_assign_grades ag
set grade = gg.finalgrade
from mdl_grade_grades gg, mdl_grade_items gi
where gi.id = gg.itemid and gi.courseid = 104 and ag.assignment = gi.iteminstance and gg.userid = ag.userid
As an administrator, I can check for this condition and work to prevent it but that is not always the case when I might have a faculty member updating their grades at the same time
I am trying to assist them.
I think the data needs to be a little less volatile and perhaps all concerned tables should be updated when grades are entered via the Grader Report.
- has a non-specific relationship to
-
MDL-13978 Problems in the quiz when the grade is locked in the gradebook
-
- Closed
-