Skip to content

Commit

Permalink
MDL-35619 fix invalid avatars on other users page
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Oct 1, 2012
1 parent 5d6285c commit e668274
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion enrol/locallib.php
Expand Up @@ -787,13 +787,15 @@ public function get_other_users_for_display(core_enrol_renderer $renderer, moodl

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

0 comments on commit e668274

Please sign in to comment.