MDL-31776 - lib: Alternate name fields - update of gradebook sql query.

This commit is contained in:
Adrian Greeve 2013-07-10 17:41:06 +08:00
parent 38dff99e64
commit 12b4487ef3

View File

@ -262,7 +262,8 @@ class grade_report_grader extends grade_report {
}
}
if ($errorstr) {
$user = $DB->get_record('user', array('id' => $userid), 'id, firstname, lastname');
$userfields = 'id, ' . get_all_user_name_fields(true);
$user = $DB->get_record('user', array('id' => $userid), $userfields);
$gradestr = new stdClass();
$gradestr->username = fullname($user);
$gradestr->itemname = $gradeitem->get_name();