Meta-course enrolments - sync task very long

Er: Re: Meta-course enrolments - sync task very long

por Iñigo Zendegi Urzelai -
Número de respuestas: 2
Imagen de Core developers Imagen de Plugin developers

Hi Severin,

I've recently found that this enrolment method has an unexpected behaviour on Moodle 3.7 (I would say it's a bug, but I'm not sure): when you add a meta-course enrolment method to a course and then disable it, every time the scheduled task is executed it enrols all the users of that enrolment method and then unenrols then again. That behaviour makes the execution of the task longer than expected and inserts a lot of non-meaningful registers to the log (and then it leaves the enrolments just the same).

If you find any recently created/modified disabled meta-enrolment methods on mdl_enrol it may be the reason of your issue.

Cheers.

En respuesta a Iñigo Zendegi Urzelai

Re: Meta-course enrolments - sync task very long

por Séverin Terrier -
Imagen de Documentation writers Imagen de Particularly helpful Moodlers Imagen de Testers Imagen de Translators
Hi Iñigo,

Thanks for your answer, and sorry for my (very) late answer.

I'm not sure i understand correctly what you mean. And when you mean Moodle 3.7, i suspect you mean from Moodle 3.7 (and still in 3.8 and 3.9)?
Talking about "disabled", do you mean enrolment method installed on a course, but "greyed"? There was a bug like this previously, but it should have been corrected by MDL-52186 some years ago.

For what i see on my Moodle (3.7.6), it creates lot of enrollments, and then deletes them, leaving related users not enrolled. I've not found (for the moment) which enrollments are created/deleted like this.

Do you have some pointers on other discussions or tracker item about that? And perhaps a good idea/solution?

This is a real pain for us.
Séverin
En respuesta a Séverin Terrier

Er: Re: Meta-course enrolments - sync task very long

por Iñigo Zendegi Urzelai -
Imagen de Core developers Imagen de Plugin developers

Hi Séverin,

I was indeed talking about leaving the enrolment method "greyed" on Moodle 3.7, but after reading your answer (and looking at MDL-52186) I'd say that what my issue is unrelated with yours I think that my issue isn't related to the standard enrol_meta method but with the enrol_metabulk method plugin that still has that same bug from MDL-52186 (we use them both, sometimes even mixing them), so I've just done a port of that fix to enrol_metabulk.