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

User with multiple requested roles is enrolled only with one role

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.1.2
    • 2.1, 2.1.1
    • Enrolments

      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.

            skodak Petr Skoda
            flips open flips (Inactive)
            Sam Hemelryk Sam Hemelryk
            Aparup Banerjee Aparup Banerjee
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.