Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-25011

Synching Moodle 2.0 cohorts with LDAP groups

    XMLWordPrintable

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.0, 2.7.1, 2.8.1
    • BACKEND
    • Cohorts, Enrolments
    • Linux

    Description

      In my place we were badly needing a synchronisation of existing LDAP groups with the new Moodle 2.0 cohorts.

      Please find enclosed a little piece of code that just do it as a CLI script to be run nightly after the synching of Moodle's users with a LDAP/CAS directory

      It does the job in my place with LDAP groups registered as groupOfUniqueNames and member attribute as uniquemember

      It deserve some improvments such as internationalization and two extra global configuration settings for places were my values are not used
      Currently they are 'hardcoded' in my class constructor

      $this->config->group_attribute = 'cn';
      $this->config->group_class = 'groupOfUniqueNames';

      Provisions are made for specific retrieving of group members against Active Directory where the number of members is greater than 999
      where MS do not use the standard response but returns results by pages of 1000 ... see http://msdn.microsoft.com/en-us/library/aa367017%28VS.85%29.aspx
      (untested here since we do not have anymore MS AD around)

      If it can find its way in Moodle 2.0 core ...

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ppollet Patrick Pollet
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Raquel Ortega, Sara Arjona (@sarjona), Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Raquel Ortega, Sara Arjona (@sarjona)
              Votes:
              69 Vote for this issue
              Watchers:
              58 Start watching this issue

              Dates

                Created:
                Updated: