diff --git a/enrol/locallib.php b/enrol/locallib.php index 8a3cbe3a6b7..182cff3a847 100644 --- a/enrol/locallib.php +++ b/enrol/locallib.php @@ -1102,13 +1102,14 @@ class course_enrolment_manager { */ private function prepare_user_for_display($user, $extrafields, $now) { $details = array( - 'userid' => $user->id, - 'courseid' => $this->get_course()->id, - 'picture' => new user_picture($user), - 'firstname' => fullname($user, has_capability('moodle/site:viewfullnames', $this->get_context())), - 'lastaccess' => get_string('never'), - 'lastcourseaccess' => get_string('never'), + 'userid' => $user->id, + 'courseid' => $this->get_course()->id, + 'picture' => new user_picture($user), + 'userfullnamedisplay' => fullname($user, has_capability('moodle/site:viewfullnames', $this->get_context())), + 'lastaccess' => get_string('never'), + 'lastcourseaccess' => get_string('never'), ); + foreach ($extrafields as $field) { $details[$field] = $user->{$field}; } diff --git a/enrol/otherusers.php b/enrol/otherusers.php index 188c9d590f0..ede4a35613a 100644 --- a/enrol/otherusers.php +++ b/enrol/otherusers.php @@ -50,6 +50,7 @@ navigation_node::override_active_url(new moodle_url('/enrol/otherusers.php', arr $userdetails = array ( 'picture' => false, + 'userfullnamedisplay' => false, 'firstname' => get_string('firstname'), 'lastname' => get_string('lastname'), ); diff --git a/enrol/users.php b/enrol/users.php index 51d4a4e2bc1..403121d876b 100644 --- a/enrol/users.php +++ b/enrol/users.php @@ -180,7 +180,7 @@ if ($action) { $renderer = $PAGE->get_renderer('core_enrol'); -$userdetails = array('picture' => false); +$userdetails = array('picture' => false, 'userfullnamedisplay' => false); // Get all the user names in a reasonable default order. $allusernames = get_all_user_name_fields(false, null, null, null, true); // Initialise the variable for the user's names in the table header.