Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Enroll External Database Release Notes

From MoodleDocs
Warning: This page is no longer in use. The information contained on the page should NOT be seen as relevant or reliable.


  • Prevent multiple cron executions by setting a flag in the config table.
  • Implemented the cron method ($auths = get_enabled_auth_plugins();).
  • Added unlimited execution time and raised memory limit for enrol/database/enrol_database_sync.php
  • Added enrollment periods. The external enroll table can have timestart and timeend for enrollments. Added two new mappings to handle this: enrol_db_remotetimestartfield and enrol_db_remotetimeendfield.
  • Added a new external table that holds course information. The mapping is stored in enrol_coursetable. This will make courses found in the external course table that do not have enrollments. The following are the available mappings:
    • enrol_coursefullname
    • enrol_courseshortname
    • enrol_courseid: The name of the field where the course ID is stored. The values of this field are used to match those in the "enrol_localcoursefield" field in Moodle's course table.
    • enrol_coursesummary
    • enrol_coursecategory
    • enrol_category_separator
    • enrol_coursestartdate
    • enrol_courseformat
    • enrol_coursetheme
    • enrol_coursepassword
    • enrol_courseguest
    • enrol_coursenumsections
    • enrol_courseidnumber
    • enrol_coursecost
    • enrol_coursenewsitems
    • enrol_courseshowgrades
    • enrol_coursegroupmode
    • enrol_coursegroupmodefoce
    • enrol_coursevisible
    • enrol_courseenrollable
    • enrol_coursetemplate: this mapping can be used to override enrol_db_template to select a different course as a template.
  • Two other settings extend the functionality of the enrol_coursetemplate setting. The enrol_restore_coursetemplate setting will backup the template course and restore it for the course creation. The enrol_restore_usetemplate setting uses the course files backupdata/template directory. If a backup, using the default backup file name, is stored in the backupdata/template directory, then it will be used for the course restore for the enrol_restore_coursetemplate setting. If no backup is found in the backupdata/template directory, then a new backup will automatically be generated and permanently stored there.
  • Courses that are found in the external course table and also be updated. This is controlled by the enrol_db_autoupdate setting.
  • Categories can automatically be created if needed. This is controlled by the enrol_autocreate_category setting.