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

Synching Moodle 2.0 cohorts with LDAP groups

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.0, 2.7.1, 2.8.1
    • Fix Version/s: BACKEND
    • Component/s: Cohorts, Enrolments
    • Labels:
    • Environment:
      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

        1. sync_cohorts.php
          28 kB
          Patrick Pollet
        2. sync_cohorts.php
          28 kB
          Patrick Pollet

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              ppollet Patrick Pollet
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
              Votes:
              69 Vote for this issue
              Watchers:
              58 Start watching this issue

                Dates

                Created:
                Updated: