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 ?
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?