-
Bug
-
Resolution: Fixed
-
Minor
-
2.1, 2.1.1
-
MOODLE_21_STABLE
-
MOODLE_21_STABLE
-
w36_
MDL-29306_m22_dbenrolroles -
The external database enrolment plugin contains a sync script which seem to contain a bug.
When a user in the external database has multiple roles in the same course, the script enrols this user with only one role.
The bug seems to be located on line 442 in the file /enrol/database/lib.php in function sync_enrolments()
I believe that the following condition:
if (empty($current_roles[$userid]))
should be replaced by:
if (empty($current_roles[$userid][roleid]))
Thanks for confirming and fixing this bug.