Permalink
Browse files

MDL-35619 fix invalid avatars on other users page

  • Loading branch information...
1 parent c5575c6 commit 10a75e713b5df8b448223dcff91171a06aa3c88f @skodak skodak committed Oct 1, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 enrol/locallib.php
View
@@ -770,13 +770,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 10a75e7

Please sign in to comment.