How to synchronize Moodle courses with courses from an external database

How to synchronize Moodle courses with courses from an external database

by Robbe R -
Number of replies: 3

At the Moodle documentation (https://docs.moodle.org/39/en/External_database_enrolment) I found that you can add courses to Moodle using an external database. I already did this with enrolments and users and this worked perfectly. Sadly with courses it is not working. Do I undestand the documentation wrong? Maybe it is not meant to be like enrolments and users, can someone help me out?

All I want to achieve is being able to add courses via an external database (just like it works with enrolments and users).

Thank you!

Average of ratings: -
In reply to Robbe R

Re: How to synchronize Moodle courses with courses from an external database

by Robbe R -
One more thing, I can't find a real explanation on how synchronizing courses on an external database works. But how I undestand it now: if an enrolment from the external database is added to moodle, with a courseid that does not exist within Moodle, Moodle queries the external courses table to find out if the course is listed there. If yes, it creates the course on Moodle with the information found on the external courses table. Is this the way it works?

Thank you!
In reply to Robbe R

Re: How to synchronize Moodle courses with courses from an external database

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

There is no facility in core Moodle for replicating course content across different databases

In reply to Robbe R

Re: How to synchronize Moodle courses with courses from an external database

by Benjamin Ellis -
Picture of Particularly helpful Moodlers
Hi,

Don't think so - you will need a custom plugin to sync external courses and I would not tie it in with enrolments. If you create a course, the user will be enrolled in an empty course - there will be no content.
Average of ratings: Useful (1)