enrol_ldap broke after upgrading to 2.9+

enrol_ldap broke after upgrading to 2.9+

by villa nova -
Number of replies: 1
Has anyone else had issues with enrol_ldap and 2.9?

We have been syncing course enrolments from our Microsoft AD servers for about 8 months now. The groups are updated nightly and enrol cli script runs every morning after that just to make sure changes are pushed.

After upgrading to 2.9 last week:
-Every time a user logs in all their LDAP enrolments are disabled.
-I force a sync and the classes are enabled again (It shows up as enrolled in their profile)
-They log back in and the courses disappear again.


Groups and courses in LDAP have not changed, only the upgrade from 2.8+ to 2.9+. For the moment i've enabled flat file to give everyone course access.

Average of ratings: -
In reply to villa nova

Re: enrol_ldap broke after upgrading to 2.9+

by villa nova -

Just updating this post with the bug report. I can confirm that the 2.9+ enrol_ldap plugin is broken in some way.

https://tracker.moodle.org/browse/CONTRIB-5821


If you blank the function "sync_user_enrolments($user)" in {www}/enrol/ldap/lib.php

then purge all caches it's at least temporarily fixed.