-
New Feature
-
Resolution: Unresolved
-
Minor
-
None
-
3.8.1, 3.10, 3.10.1
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:
- 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.
- 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.
- 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.
- If we don't use the category field, we can specify a default category.
- 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.
- 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).
- 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.