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

Various issues in MNet update_enrolments method (partial backport of MDL-76055)

XMLWordPrintable

    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_400_STABLE
    • MOODLE_400_STABLE
    • Hide
      1. Run the instructions @ MDLQA-17377, with one site being 401_STABLE and the other being 400_STABLE. With only this change:
        1. Ensure that, in points 7.1 and 8.2... BOTH "publish" and "subscribe" options are ticked (that will enable the following point to be possible).
      2. Test it in both directions (enrolments configured in 401 effectively happen in 400 and enrolments configured in 400 effectively happen in 401).
      3. Verify that everything works as expected.
      Show
      Run the instructions @ MDLQA-17377 , with one site being 401_STABLE and the other being 400_STABLE. With only this change: Ensure that, in points 7.1 and 8.2... BOTH "publish" and "subscribe" options are ticked (that will enable the following point to be possible). Test it in both directions (enrolments configured in 401 effectively happen in 400 and enrolments configured in 400 effectively happen in 401). Verify that everything works as expected.

      I discovered these while working on another issue. There are multiple issues with the MNet remote enrolment method auth_plugin_mnet::update_enrolments()

      • There is a typo in the table name "mnetervice_enrol_courses" (missing "s") so that the method has never worked since 2010 - and the exception was likely never noticed since it was threw on the remote MNet connection side.
      • The list $local_courseid_array is populated with the "id" values from the "mnetservice_enrol_courses" but it is then compared with "remotecourseid" value in "mnetservice_enrol_enrolments" when deleting all extra enrolments. So it would actually delete other records than it should. This never happened because of the typo above.

      As a result, the IdP has never had fully reliable and up-to-date information about remote courses the user is enrolled to on the remote MNet site.

            stronk7 Eloy Lafuente (stronk7)
            mudrd8mz David Mudrák (@mudrd8mz)
            Andrew Lyons Andrew Lyons
            Jun Pataleta Jun Pataleta
            Amaia Anabitarte Amaia Anabitarte
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 5 hours, 50 minutes
                5h 50m

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