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

Enable autoloading of enrolment plugins

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.6.2
    • Fix Version/s: 2.7
    • Component/s: Enrolments
    • Labels:
    • Testing Instructions:
      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.
    • Affected Branches:
      MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_27_STABLE
    • Pull Master Branch:

      Description

      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

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                maherne Michael Aherne
                Reporter:
                maherne Michael Aherne
                Peer reviewer:
                Petr Skoda
                Integrator:
                Marina Glancy
                Tester:
                Adrian Greeve
                Participants:
                Component watchers:
                Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  12/May/14