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

externallib files: go throught all externallib.php files and replace key_exists by array_key_exists

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3.1
    • Fix Version/s: 2.2.6, 2.3.3
    • Component/s: Web Services
    • Labels:
    • Testing Instructions:
      Hide

      Impacted location:

      • In web service administration: make service with authorized user, and add all functions. Add a student to the service. On the same page, missing capabilities are displayed for this student. No php error related to array_key_exists should be displayed.
      • Run web services PHPunit test for /course/tests/externallib_tests.php, /enrol/tests/externallib_tests.php, /enrol/manual/tests/externallib_tests.php.
      • go to the search page into the community block, check there is no php error related to array_key_exists.
      • in the admin create a token for a student. Link the token to a service containing all functions. Some missing capabilities should be displayed in the page. Check there is no php error related to array_key_exists.
      • trigger a moodle upgrade, check there is no error (a change has been done during web service functions update)
      Show
      Impacted location: In web service administration: make service with authorized user, and add all functions. Add a student to the service. On the same page, missing capabilities are displayed for this student. No php error related to array_key_exists should be displayed. Run web services PHPunit test for /course/tests/externallib_tests.php, /enrol/tests/externallib_tests.php, /enrol/manual/tests/externallib_tests.php. go to the search page into the community block, check there is no php error related to array_key_exists. in the admin create a token for a student. Link the token to a service containing all functions. Some missing capabilities should be displayed in the page. Check there is no php error related to array_key_exists. trigger a moodle upgrade, check there is no error (a change has been done during web service functions update)
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Pull Master Branch:

      Description

      Also check other place in Moodle

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            rwijaya Rossiani Wijaya added a comment -

            Hi Jerome,

            The patch looks fine for 2.3 and 2.4.

            However in 2.2, there's still 'key_exists' call in /webservice/simpletest/testwebservice.php.

            Feel free to submit it for integration with the above fix.

            Show
            rwijaya Rossiani Wijaya added a comment - Hi Jerome, The patch looks fine for 2.3 and 2.4. However in 2.2, there's still 'key_exists' call in /webservice/simpletest/testwebservice.php. Feel free to submit it for integration with the above fix.
            Hide
            jerome Jérôme Mouneyrac added a comment -

            Thanks Rosie, I fixed the simpletest tests on 2.2, submitting to integration.

            Show
            jerome Jérôme Mouneyrac added a comment - Thanks Rosie, I fixed the simpletest tests on 2.2, submitting to integration.
            Hide
            samhemelryk Sam Hemelryk added a comment -

            Thanks Jerome, has been integrated now

            Show
            samhemelryk Sam Hemelryk added a comment - Thanks Jerome, has been integrated now
            Hide
            fred Frédéric Massart added a comment -

            Test passed. PHP Unit did not apply to 2.2, and in 2.3 the enrol/ tests were not present. Cheers!

            Show
            fred Frédéric Massart added a comment - Test passed. PHP Unit did not apply to 2.2, and in 2.3 the enrol/ tests were not present. Cheers!
            Hide
            nebgor Aparup Banerjee added a comment -

            Your issue has dug up some gold.
            It works great i've been told.
            Go forth, be brave, be bold.

            yay! "All your thoughts are belong to everyone."

            Thanks and ciao!

            Show
            nebgor Aparup Banerjee added a comment - Your issue has dug up some gold. It works great i've been told. Go forth, be brave, be bold. yay! "All your thoughts are belong to everyone." Thanks and ciao!

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  12/Nov/12