bobopinna / moodle-enrol_autoenrol

Auto enrol plugin for Moodle. Forked from markward/enrol_autoenrol and reorganised for direct cloning in Moodle tree
13 stars 22 forks source link

how to enrol to multiple groups #32

Closed wimglasseesjibe closed 2 years ago

wimglasseesjibe commented 2 years ago

Hi,

I want to enrol a student to a general information course. All users get to be enrolled but they're member of multiple groups within that course (based on class and year).

So student A form class 1A has to be enrolled to course 'student info' and become a member of the group '1A' and the group 'first graders'.

I only seem to be able to fix 1 group membership, not both.

Am I missing something? Or is there another easy way to do this? Or would this be an interesting addition to your codebase?

I found another plugin that allowed this but its user filter was very very basic.

Thanks in advance,

Wim

bobopinna commented 2 years ago

Hi Wim, to do that you need to add an autoenrol instance for each group and set the option Always Enrol enabled in all instances. Otherways only the first instance of an enrol method that match is used.

wimglasseesjibe commented 2 years ago

Hi Roberto,

thanks for the fast reply!

I tried that. I have 2 auto enrol instances that each add the user to the same course but in a different group. I have the feeling only the first one triggers. After all, once the user is added to a course why would it try the next enrollment method?

Wim

bobopinna commented 2 years ago

Hi Wim, you can check how the student is enrolled in the participants list. When a user is enrolled with more than one method/instance, you can see multiple active enrolments in Status column. Here you can see a user enrolled with 5 autoenrol instances. Screenshot 2021-12-23 at 09 27 46