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

Enable autoloading of enrolment plugins

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.7
    • 2.6.2
    • Enrolments
    • MOODLE_26_STABLE
    • MOODLE_27_STABLE
    • Hide
      1. Take an enrolment plugin (e.g. enrol/ldap) and move lib.php to classes/plugin.php.
      2. Purge all caches.
      3. Before applying the patch, confirm that the plugin does not appear on the "Manage enrolment plugins" page.
      4. Apply the patch.
      5. Confirm that the plugin now appears on the "Manage enrolment plugins" page
      6. Confirm that the enrolment plugin works as normal.
      Show
      Take an enrolment plugin (e.g. enrol/ldap) and move lib.php to classes/plugin.php. Purge all caches. Before applying the patch, confirm that the plugin does not appear on the "Manage enrolment plugins" page. Apply the patch. Confirm that the plugin now appears on the "Manage enrolment plugins" page Confirm that the enrolment plugin works as normal.

      With the automatic class loading that was introduced in 2.6, it's possible to create an enrolment plugin that works perfectly well by putting the plugin class in classes/plugin.php. However, the way enrol_get_plugins() currently works means that this plugin will not be loaded unless you have an empty lib.php file.

      It might be better if the existence of the plugin class were checked before trying to "manually" load it from lib.php

            maherne Michael Aherne
            maherne Michael Aherne
            Petr Skoda Petr Skoda
            Marina Glancy Marina Glancy
            Adrian Greeve Adrian Greeve
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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