Permalink
Browse files

MDL-35619 fix invalid avatars on other users page

  • Loading branch information...
1 parent 9273bd1 commit 50675bf5492af688df51311f3cae118e878aadf9 @skodak skodak committed Oct 1, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 enrol/locallib.php
View
@@ -766,13 +766,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;

0 comments on commit 50675bf

Please sign in to comment.