Merge branch 'MDL-51586-master' of git://github.com/xow/moodle

This commit is contained in:
Dan Poltawski 2015-10-12 10:47:13 +01:00
commit 0015ec87d6
3 changed files with 9 additions and 7 deletions

View File

@ -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};
}

View File

@ -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'),
);

View File

@ -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.