MDL-45071 mod_quiz: retrieve all the name fields when deleting a user override
authorMark Nelson <markn@moodle.com>
Mon, 14 Apr 2014 01:41:58 +0000 (18:41 -0700)
committerMark Nelson <markn@moodle.com>
Mon, 14 Apr 2014 01:41:58 +0000 (18:41 -0700)
mod/quiz/overridedelete.php

index ec841ae..3c99068 100644 (file)
@@ -83,8 +83,9 @@ if ($override->groupid) {
     $group = $DB->get_record('groups', array('id' => $override->groupid), 'id, name');
     $confirmstr = get_string("overridedeletegroupsure", "quiz", $group->name);
 } else {
     $group = $DB->get_record('groups', array('id' => $override->groupid), 'id, name');
     $confirmstr = get_string("overridedeletegroupsure", "quiz", $group->name);
 } else {
+    $namefields = get_all_user_name_fields(true);
     $user = $DB->get_record('user', array('id' => $override->userid),
     $user = $DB->get_record('user', array('id' => $override->userid),
-            'id, firstname, lastname');
+            'id, ' . $namefields);
     $confirmstr = get_string("overridedeleteusersure", "quiz", fullname($user));
 }
 
     $confirmstr = get_string("overridedeleteusersure", "quiz", fullname($user));
 }