Enrolling students into groups via external database

Enrolling students into groups via external database

Judy Bartlettdən -
Number of replies: 1

We have a situation where we have several courses and within those courses there are class groups. For instance several hundred students take AS Psychology, and they are all enrolled on the AS Psychology course but they are in different classes.

We use the external database enrolment plugin to sync course enrolments with our MIS database, and it works fine for course enrolments but I want to be able put students into class groups within courses as well.

We used to use 1.9 and with the help of this post I cobbled together a solution that worked and synched the class groups with our MIS system. So when it ran the enrolment script it would look at our database, check which group they were in and add them to that group, creating the group if it didn't exist, removing them from other groups etc

Now we've upgraded to 2.4 and the database enrol plugin script looks very different. I'm guessing the best way to achieve what I want would be to create a new enrolment plugin based on the database one but with another remote field for groupId.

My PHP is not great and my moodle dev skills even less so - so before I start I was wondering:

Has anyone done this already? can you give me a few pointers/something I can steal gülürəm?

Is there a (really) basic guide to creating an enrolment plugin?

Am I missing something and is there another way of doing this in Moodle 2?

 

 

 

Orta qiymət: -
In reply to Judy Bartlett

Re: Enrolling students into groups via external database

Sandra Kingdən -

I am in 2.0 and ended up creating a script that adds a student each time it loads on our enrolment page.  My only problem is that it isn't enroling students as students, but leaving them without a role in the course.

You can find my script inside this post...

mysql enrolment from ecommerce program.

Don't know if it will help you, but since I basically need the same thing you need, it can't hurt.