MDL-53239 grader report: Add all names to error msg
authorDavid Monllao <davidm@moodle.com>
Thu, 25 Feb 2016 07:02:01 +0000 (15:02 +0800)
committerDavid Monllao <davidm@moodle.com>
Thu, 17 Mar 2016 02:57:57 +0000 (10:57 +0800)
grade/report/grader/ajax_callbacks.php

index f0c7188..0d971a7 100644 (file)
@@ -91,7 +91,7 @@ switch ($action) {
                 }
 
                 if ($errorstr) {
-                    $user = $DB->get_record('user', array('id' => $userid), 'id, firstname, lastname');
+                    $user = $DB->get_record('user', array('id' => $userid), 'id, ' . get_all_user_name_fields(true));
                     $gradestr = new stdClass();
                     $gradestr->username = fullname($user);
                     $gradestr->itemname = $grade_item->get_name();