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

Synchronize cohorts with a Moodle users profile field

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 2.0
    • Fix Version/s: None
    • Component/s: Cohorts, Enrolments
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE

      Description

      My Moodle users authenticate with CAS (SSO) based on a LDAP server.

      Moodle accounts are created when users authenticate for the first time. Some fields are copied from the LDAP server and kept synchronized each time users connect to Moodle.

      There is a "group" field in each LDAP entry which is copied to a Moodle profile field. I wish to use this field to keep cohorts synchronized.

      For example, a Moodle user has the group field set to "M1SLJ" and there is a cohort somewhere which has the same cohort ID. I wish to see a script which would synchronize the group field from Moode users profile with the cohorts.

      If a new user connects to Moodle and has the group field set to "M1SLJ", they would be automatically added to the corresponding cohort.

      The script could be run in a cron or each time a user connects to Moodle ?

      How hard would it be to implement this ?

      It might be related to http://tracker.moodle.org/browse/MDL-25011 ...

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            flips Philippe Siwinski
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona), Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
            Votes:
            6 Vote for this issue
            Watchers:
            13 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: