External DB Enrolment - course title

External DB Enrolment - course title

by Dave Perry -
Number of replies: 0
Picture of Testers

I have tried search for an answer to the below, but to no full avail.

I am investigating using the External Database Enrolment method, for a live instance. I have found an example of the enrolments table, in an old post:

Moodle in English: Sample external enrollment database

I note from the moodle doc that you can tell moodle to create a course, if it doesn't find that code there - and specify the course template ID (moodle generated), as well as the category ID (optionally, but might as well include it for completeness).

But, I cannot find an example of what the database table would look like to include the course template ID AND the course title. Also, would I have to include this information in the same course_enrolments (for example) table? So the fields would be these (my names chosen):

  • course_id (e.g. to match course's short_name in moodle, such as CC123)
  • user_id (e.g. student ID, such as ST123)
  • user_role (e.g. teacher)
  • course_category (e.g. moodle-generated category ID)
  • course_title (e.g. Course Title 123)
  • course_template (e.g. moode page ID of a course template)

As we're looking at this for the 23-24 academic year, it will likely be for Moodle 4.x (unless for some reason, we stay with the 3.x latest build of the time). If that makes a difference (though the moodle docs suggest this should not make a difference).


TIA

Average of ratings: -