Skip to content

Commit

Permalink
Merge branch 'w40_MDL-35619_m23_otheravatars' of git://github.com/sko…
Browse files Browse the repository at this point in the history
…dak/moodle into MOODLE_23_STABLE
  • Loading branch information
danpoltawski committed Oct 2, 2012
2 parents 373d317 + 50675bf commit e136113
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion enrol/locallib.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -766,13 +766,15 @@ public function get_other_users_for_display(core_enrol_renderer $renderer, moodl


$users = array(); $users = array();
foreach ($userroles as $userrole) { foreach ($userroles as $userrole) {
$contextid = $userrole->contextid;
unset($userrole->contextid); // This would collide with user avatar.
if (!array_key_exists($userrole->id, $users)) { if (!array_key_exists($userrole->id, $users)) {
$users[$userrole->id] = $this->prepare_user_for_display($userrole, $extrafields, $now); $users[$userrole->id] = $this->prepare_user_for_display($userrole, $extrafields, $now);
} }
$a = new stdClass; $a = new stdClass;
$a->role = $roles[$userrole->roleid]->localname; $a->role = $roles[$userrole->roleid]->localname;
$changeable = ($userrole->component == ''); $changeable = ($userrole->component == '');
if ($userrole->contextid == $this->context->id) { if ($contextid == $this->context->id) {
$roletext = get_string('rolefromthiscourse', 'enrol', $a); $roletext = get_string('rolefromthiscourse', 'enrol', $a);
} else { } else {
$changeable = false; $changeable = false;
Expand Down

0 comments on commit e136113

Please sign in to comment.