Merge branch 'MDL-36184-23' of git://github.com/damyon/moodle into MOODLE_23_STABLE
[moodle.git] / mod / assign / locallib.php
index 6f449a9..001f2d0 100644 (file)
@@ -2647,7 +2647,7 @@ class assign {
         $modifiedusers = array();
         foreach ($currentgrades as $current) {
             $modified = $users[(int)$current->userid];
-            $grade = $this->get_user_grade($userid, false);
+            $grade = $this->get_user_grade($modified->userid, false);
 
             // check to see if the outcomes were modified
             if ($CFG->enableoutcomes) {