General plugins (Local): LDAP syncing scripts

local_ldap
Maintained by Picture of Charles Fulton Charles Fulton
This plugin synchronizes Moodle cohorts against an LDAP directory using either group memberships or attribute values.
293 sites
316 downloads
10 fans

This plugin synchronizes Moodle cohorts against an LDAP directory using either group memberships or attribute values. This is a continuation of Patrick Pollet's local_ldap plugin, which in turn was inspired by MDL-25011 and MDL-25054.

This plugin requires that you have either CAS or LDAP enabled as an authentication method. It officially supports OpenLDAP and Active Directory. Both have unit test coverage.

The synchronization tasks are managed as scheduled tasks and are disabled by default.

Screenshots

Screenshot #0

Contributors

Picture of Charles Fulton
Charles Fulton (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of Jan Derecz
    Tue, 22 May 2018, 9:08 PM
    only one
  • Picture of Charles Fulton
    Tue, 22 May 2018, 9:11 PM
    Hi Jan,

    As there are no users in LDAP with the Dep1 attribute, the plugin isn't syncing the Dep1 cohort at all. If you manually remove User A he shouldn't be re-added.

    Charles
  • Picture of Jan Derecz
    Wed, 23 May 2018, 1:26 AM
    Ok, I think that I know the reason. If I use only cohorts creating from AD then DELETE FROM cohort_members before sync should resolve my problem?
  • Picture of Guybrush Threepwood
    Fri, 25 May 2018, 2:55 PM
    Still no change to sync cohorts from my AD groups... No cohorts are created and existing cohorts is not populated based on AD Groups... any help would be appreciated. I already asked in the related discussion: https://moodle.org/mod/forum/discuss.php?d=160751.
  • Picture of Marlise Nauer
    Mon, 18 Jun 2018, 10:14 PM
    Hi Charles
    We use moodle 3.5 with your latest plugin.
    We have the same affect like Guybrush.
    Is there any solution for that problem?
    Best regards Marlise
  • Picture of Charles Fulton
    Mon, 18 Jun 2018, 10:33 PM
    Hi Marlise,

    I believe what Guybrush is experiencing is a configuration issue and not a problem with the plugin.

    Best,

    Charles
  • Picture of Zigor Astarbe
    Tue, 10 Jul 2018, 9:16 PM
    FEATURE REQUEST:
    Hi friends, don't know where to write to make a feature request for this plugin:
    - Is it possible to make an option to delete unused cohorts? (with no users in it).
    - Is it possible to make an option to detele unsynced cohorts? (cohorts with no group in active directory).

    thanks in advance,

    Zigor.
  • Picture of Charles Fulton
    Tue, 10 Jul 2018, 9:59 PM
    Hi Zigor, you may contribute feature requests at https://github.com/LafColITS/moodle-local_ldap/issues. Best, Charles.
  • Picture of KME Support
    Wed, 22 Aug 2018, 3:48 AM
    Hi Charles. I have a similar issue to guybrush. When i run the scheduled task i get the same output but no cohorts are synced.
    I guess the issue appeared since upgrade to Moodle 3.5 but we haven‘t made any change to the configuration since then, except we changed the ldap username attribute to UPN. I already tried changing it back to samAccount name but it still doesn‘t work.

    Any ideas to trace that issue?

    Thanks for any reply and your great work.

    Simon
  • Picture of Michel Rancourt
    Thu, 23 Aug 2018, 5:10 AM
    Hi Charles, since upgrade to 3.5 no cohorts updates and no cohorts creation. Same issues.

    Thank you
  • Picture of Charles Fulton
    Thu, 23 Aug 2018, 5:23 AM
    Folks, I'm not sure what to suggest. My institution is running on 3.5.1 and the plugin works. Our backend is OpenLDAP. I don't have an Active Directory environment to test against. If I had to venture a guess, the paged user queries to AD either aren't returning users or are returning them in an unexpected way.
  • Picture of KME Support
    Thu, 23 Aug 2018, 8:00 PM
    I was able to track down the issue on our side, and it was indeed NOT related to the Plugin, sorry for the confusion. Instead we had two different Problems with the Moodle LDAP Config and inconsistent Groups in Active Directory. Also since Moodle 3.5, only 100 cohorts are listed in the dropdown menu, which made our teachers first think, the cohorts where not created.

    Anyway on thing i thought would be great to have, was a debug parameter for the CLI Script sync_cohorts.php to display the results, that are fetched from LDAP. Since i had no clue what the plugin does in the background, i tried to output contents of variables by placing print_r() in different places in the code of the plugin. That's how i finally figured out, that the plugin was actually working correctly ... big grin

    Once again thanks for your work!
  • Picture of Charles Fulton
    Fri, 31 Aug 2018, 11:26 PM
    Brief update: I've obtained access to an Active Directory test environment. I've identified at least one bug which affect attribute synchronization with large environments. I hope to release an update in the next few days which corrects this problem. I appreciate everyone's patience and I'm sorry that it's taken so long to resolve this issue.
  • Picture of Charles Fulton
    Thu, 6 Sep 2018, 4:03 AM
    I've identified and fixed a couple bugs in the Active Directory code related to pagination. I can't say for sure that these changes will resolve the issues folks are seeing, but they might. The code is available here: https://github.com/LafColITS/moodle-local_ldap/releases/tag/v3.4.1-rc.1. I'd love to hear from folks on Active Directory before I publish a formal release.

    Thanks,

    Charles
  • Picture of Michel Rancourt
    Thu, 6 Sep 2018, 11:30 PM
    I've updated the plugin and a lot of cohorts are add / updated! thanks a lot.
1 2 3 4
Please login to post comments