MDL-36966 Assignment: Bug - Student submission appears graded by themselves.
authorRaymond Wijaya <raymond.wijaya@netspot.com.au>
Mon, 3 Dec 2012 04:34:43 +0000 (15:04 +1030)
committerDamyon Wiese <damyon@moodle.com>
Tue, 18 Dec 2012 00:47:14 +0000 (08:47 +0800)
Fix a bug when a student editing his submission after it has been graded, it changes the 'graded by' details to the student's name in the feeback summary

mod/assign/locallib.php

index 2564d0e..81b6186 100644 (file)
@@ -2192,7 +2192,7 @@ class assign {
                 }
 
                 $gradeddate = $gradebookgrade->dategraded;
-                $grader = $DB->get_record('user', array('id'=>$gradebookgrade->usermodified));
+                $grader = $DB->get_record('user', array('id'=>$grade->grader));
 
                 $feedbackstatus = new assign_feedback_status($gradefordisplay,
                                                       $gradeddate,