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

Improve the enrol API to prevent logic in the UI

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.7.3, 2.8.1
    • 3.1
    • Enrolments
    • Team '; drop tables Sprint 9, Team ';drop tables Sprint 10, 3.1 Sprint 5
    • Large

    Description

      Currently the enrolment API relies on logic that is tied to the user interface. Two examples:

      • the callback enrol_plugin::get_newinstance_link() determines whether or not a new instance can be added to the course.
      • the enrol plugin meta has advanced validation happening in its form class

      If we want to be able to add webservices to the enrolments, or make the plugins self-aware of their limitations, settings, validations, ... the API should be self-contained and not spread across UI methods, or form validations.

      Moreover, there is not defined mapping between the columns customint, customchar, ... making it really difficult to create generic webservices or external use of the enrolment API. An existing example is the ability to create new enrolments in tool_uploadcourse where a user has to analyse the code to find out how what customxxx columns to use to configure the enrolments methods.

      Attachments

        Issue Links

          Activity

            People

              damyon Damyon Wiese
              fred Frédéric Massart
              Ryan Wyllie Ryan Wyllie
              Andrew Lyons Andrew Lyons
              Frédéric Massart Frédéric Massart
              David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                23/May/16