Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-29306

User with multiple requested roles is enrolled only with one role

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1, 2.1.1
    • Fix Version/s: 2.1.2
    • Component/s: Enrolments
    • Labels:

      Description

      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.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                10/Oct/11