Merge branch 'w50_MDL-30528_m23_enrolroleid' of git://github.com/skodak/moodle

This commit is contained in:
Sam Hemelryk 2011-12-08 15:50:42 +13:00
commit 4bd1fc7ef7

View File

@ -185,7 +185,7 @@ class enrol_database_plugin extends enrol_plugin {
$existing = array();
foreach ($current as $r) {
if (in_array($r->id, $roles)) {
if (in_array($r->roleid, $roles)) {
$existing[$r->roleid] = $r->roleid;
} else {
role_unassign($r->roleid, $user->id, $context->id, 'enrol_database', $instance->id);