Update external database on course creation

Update external database on course creation

by Rustam Rakhimov -
Number of replies: 4

Hello!

I'm trying to implement external authentication and external enrolment for my Moodle system. So I need to update external database table every time new course in Moodle is created with course id and shortname. Maybe launch some sync script every time new course is created. Is it possible? Thank you.

Average of ratings: -
In reply to Rustam Rakhimov

Re: Update external database on course creation

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
Does the database enrollment task not do that? Can't you just schedule it to run every few minutes? Admin/scheduled tasks...
In reply to Emma Richardson

Re: Update external database on course creation

by Rustam Rakhimov -
Sure, scheduled script is definitely an option. However, maybe it's possible to update external table instantly on course creation? Maybe trigger some event to launch update script?