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

Enhanced external database enrolment plugin

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      • The patched files have to be applied inside:
        • <moodle_dirroot>/enrol/database
      • External database enrolment method allowed from:
        • Site administration->Plugins->Enrolments-> Manage enrol plugins
      • The enrolment method settings configured in:
        • Site administration->Plugins->Enrolments-> External database
      • The synchronization task executed from:
        • Site administration->Server->Tasks->Scheduled tasks->Synchronise external database enrolments task 
      Show
      The patched files have to be applied inside: <moodle_dirroot>/enrol/database External database enrolment method allowed from: Site administration->Plugins->Enrolments-> Manage enrol plugins The enrolment method settings configured in: Site administration->Plugins->Enrolments-> External database The synchronization task executed from: Site administration->Server->Tasks->Scheduled tasks->Synchronise external database enrolments task 
    • Affected Branches:
      MOODLE_38_STABLE

      Description

      The External database enrolment method is a bit limited, especially in the Creation of new courses area, and that is why an increase in its functionalities was proposed with enough repercussion some years ago in the Moodle general developer forum, which would consist of the following points or features:

      1. When automatically creating courses from the external enrolment database we can specify the fields that hold (all of the fields are optional):
        • the short name
        • the full name
        • the ID number
        • the summary
        • the (name of the) category the course belongs to.
        • the (short name of the) course to use as a template for the new course.
      2. In case we use the category field, we can use nested categories (sub-categories). We just need to specify the character used as separator. If we don't specify one, then nested categories are disabled.
      3. If we use nested categories, any missing intermediate categories are automatically created. For example, if we specify the '|' character as the separator and we have 'Top Level Category|Second Level Category| Third Level Category|My Category' in the category field, then the course will be created in the fourth level category named 'My Category'. If any of 'Top Level Category', 'Second Level Category', 'Third Level Category' or 'My Category' don't exist beforehand, they are automatically created before creating the course itself.
      4. If we don't use the category field, we can specify a default category.
      5. If the category specified in the external enrolment database doesn't exist, that category is not created and the course is created inside the default category.
      6. We can choose whether the automatic course creation is performed during logon, or just when enrol_database_sync.php is run. Course creation can be time consuming (and CPU intensive) if we are using course templates (see below) so we can disable it at logon (to reduce logon time and be able to schedule the burden of the course creation during low usage hours).
      7. If we use course templates for the new courses, we duplicate the course, including course settings, course sections, all course activities, all course blocks, etc. It's a complete clone of the existing course, except for the unique data (short name, full name, summary, id number and category) and the enrolled users and their data (submissions, comments, etc.).

       

      The patch attached to this issue explains what I am trying to describe and it is actually working without known bugs in our production server (Moodle version 3.7), with its compatibility tested also in version 3.8.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              Kepa Kepa Urzelai
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: