-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
2.5
-
None
-
MOODLE_25_STABLE
Steps to reproduce:
1) Enroll 10 students in a class
2) pick one these 10 students at random and have them submit an assignment in the class.
3) teacher sees new submission in ajax marking and clicks to bring up the grading pup-up.
Now, the grading popup may report that there is already a grade in the gradebook and report a seemingly random number, or say that the grade is overridden in the gradebook.
In my investigations, I have found that what was happening was that ajax marking was reporting the grades for the user enrolled in the course with the lowest userid (database ID number in mdl_user table). I think this is because large parts of the assign module seem to have been refactored/rewritten in 2.5.
My proposed fix is:
In: blocks/ajax_marking/modules/assign/block_ajax_marking_assign.class.php
on or about line 290 replace:
$pagination = array('rownum' => 0, 'useridlist' => array($params['userid']), 'last' => 0);
with:
$pagination = array('rownum' => 0, 'userid' => $params['userid'], 'useridlist' => array($params['userid']), 'last' => 0);