MDL-37559 fix display of multiple roles of other users

Credit goes to Tyron Delean, thanks.
This commit is contained in:
Petr Škoda 2013-01-19 16:50:38 +01:00
parent a5ec499521
commit 00c269db37

View File

@ -875,7 +875,9 @@ class course_enrolment_manager {
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