Multiple Courses from External Enrolment

Multiple Courses from External Enrolment

by Percy McKnight -
Number of replies: 1

Hi All

I have external enrolment working fine for one course per student.

However, if a student enrols on a second course (externally), then Moodle no longer understands the course ID, as it seems to concatenate the two course IDs from the field in the remote table.

So, if I have this data for a student in my remote field:  ID001 - that works fine and Moodle puts the student on the correct course when they login.

But, if I have this data in the remote field: ID001,ID002 - that stops working as Moodle does not seem able to identify two courses there.

I have tried using comma delimiters, a pipe delimiter and putting the second course ID on a new row within the same record.

But - still no joy - Moodle simply reports that course ID001 ID002 has not been created yet.

How can I resolve this?

Percy.

Average of ratings: -
In reply to Percy McKnight

Re: Multiple Courses from External Enrolment

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

You need to add as many different records as enrolled courses. Say student 'STUD01' is enrolled in courses 'ID001' and 'ID002'. Then you need to create two different records:

+--------+-------+
| STUD01 | ID001 |
| STUD01 | ID002 |
+--------+-------+

Saludos. Iñaki.