Permalink
Browse files

MDL-37559 fix display of multiple roles of other users

Credit goes to Tyron Delean, thanks.
  • Loading branch information...
skodak committed Jan 19, 2013
1 parent 7def533 commit 55fc886ea7174e6084b38c2c11d76205838fbfbc
Showing with 3 additions and 1 deletion.
  1. +3 −1 enrol/locallib.php
View
@@ -840,7 +840,9 @@ public function get_other_users_for_display(core_enrol_renderer $renderer, moodl
break;
}
}
- $users[$userrole->id]['roles'] = array();
+ if (!isset($users[$userrole->id]['roles'])) {
+ $users[$userrole->id]['roles'] = array();
+ }
$users[$userrole->id]['roles'][$userrole->roleid] = array(
'text' => $roletext,
'unchangeable' => !$changeable

0 comments on commit 55fc886

Please sign in to comment.