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

enrol_ldap incorrectly concludes that pagination is not supported

    XMLWordPrintable

Details

    • MOODLE_32_STABLE, MOODLE_33_STABLE, MOODLE_34_STABLE
    • MOODLE_32_STABLE, MOODLE_33_STABLE
    • MDL-58286-master
    • Hide

      Prerequisites

      1. A working LDAP server with enrolments set up that supports paged results. You must have more than 10 users
      2. Ideally for these tests, you should configure your server so it has more users to sync than the maximum amount of entries to return when not using paged results. If you are using OpenLDAP, you can configure the following settings in your OpenLDAP database (means 5 entries as a soft limit without paged results, 10 as a hard limit without paged results, and unlimited when using paged results)

        olcLimits: * size.soft=5 size.hard=10 size.prtotal=unlimited

        Thus, if you have more than 10 users to sync, without using paged results you will only sync the first 10, and miss the rest. If the limit is higher, adjust the test instructions accordingly.

      Testing

      1. Enable LDAP enrolments at Site administration > Plugins > Enrolments > Manage enrol plugins and clicking the eye next to it
      2. Configure LDAP enrolments by clicking the cog next to it
      3. https://docs.moodle.org/en/LDAP_enrolment
      4. In LDAP enrolments configuration, set the version to version 3
      5. Run php admin/tool/task/cli/schedule_task.php --execute="enrol_ldap\task\sync_enrolments"
      6. Make sure only 10 are synced
      Show
      Prerequisites A working LDAP server with enrolments set up that supports paged results. You must have more than 10 users Ideally for these tests, you should configure your server so it has more users to sync than the maximum amount of entries to return when not using paged results. If you are using OpenLDAP, you can configure the following settings in your OpenLDAP database (means 5 entries as a soft limit without paged results, 10 as a hard limit without paged results, and unlimited when using paged results) olcLimits: * size.soft=5 size.hard=10 size.prtotal=unlimited Thus, if you have more than 10 users to sync, without using paged results you will only sync the first 10, and miss the rest. If the limit is higher, adjust the test instructions accordingly. Testing Enable LDAP enrolments at Site administration > Plugins > Enrolments > Manage enrol plugins and clicking the eye next to it Configure LDAP enrolments by clicking the cog next to it https://docs.moodle.org/en/LDAP_enrolment In LDAP enrolments configuration, set the version to version 3 Run php admin/tool/task/cli/schedule_task.php --execute="enrol_ldap\task\sync_enrolments" Make sure only 10 are synced

    Description

      The fix for MDL-50625 introduced the bug by which the sync.php script always assumes that the LDAP Server does not support pagination.

      The reason is that ldap_paged_results_supported() is called without a connection, which then always returns false.

       

      Attachments

        Issue Links

          Activity

            People

              johno John Okely
              bianco.veigel Bianco Veigel
              Simey Lameze Simey Lameze
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Ryan Wyllie Ryan Wyllie
              David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              1 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                10/Jul/17