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

Plugins overview page calls curl unnecessarily

    XMLWordPrintable

    Details

    • Affected Branches:
      MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
    • Fixed Branches:
      MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE
    • Pull 3.9 Branch:
    • Pull 3.10 Branch:
      MDL-72515-310
    • Pull 3.11 Branch:
      MDL-72515-311
    • Pull Master Branch:
      MDL-72515-master
    • Testing Instructions:
      Hide

      For this test you need to monitor the external requests performed by your local moodle. For example, you can add an error_log() call to the function call_service() in lib/classes/update/api.php

      To test on master modify version.php and set $release='3.11'; for the whole duration of this test, otherwise no plugins on moodle.org will pass the version check.

      1. Install several plugins from the https://moodle.org/plugins but install not the latest version (you need to download older versions and install them from ZIPs, do not use the "Install now" button as it always installs the latest version).
      2. Go to the Site administration>Plugins>Plugin overview
      3. Make sure there are no requests to moodle.org when page is rendered
      4. Click the button "Check for available updates"
      5. This will perform request to moodle.org
      6. Now the page shows that there are available updates and the button "Install available updates"
      7. Open the page "Plugin overview" again, refresh it several times
      8. There should be no requests to moodle.org
      9. The button "Install available updates" should show the number of updates that are actually installable. For example, if the plugin folder is not writable it will notify that the update is available but will not increase the count of installable plugins. If there are no installable plugins the button will not be displayed at all. Change the permissions of some folders to make sure that the count is correct
      Show
      For this test you need to monitor the external requests performed by your local moodle. For example, you can add an error_log() call to the function call_service() in lib/classes/update/api.php To test on master modify version.php and set $release='3.11'; for the whole duration of this test, otherwise no plugins on moodle.org will pass the version check. Install several plugins from the https://moodle.org/plugins but install not the latest version (you need to download older versions and install them from ZIPs, do not use the "Install now" button as it always installs the latest version). Go to the Site administration>Plugins>Plugin overview Make sure there are no requests to moodle.org when page is rendered Click the button "Check for available updates" This will perform request to moodle.org Now the page shows that there are available updates and the button "Install available updates" Open the page "Plugin overview" again, refresh it several times There should be no requests to moodle.org The button "Install available updates" should show the number of updates that are actually installable. For example, if the plugin folder is not writable it will notify that the update is available but will not increase the count of installable plugins. If there are no installable plugins the button will not be displayed at all. Change the permissions of some folders to make sure that the count is correct

      Description

      If there are plugins waiting for update, the "Plugins overview" page makes a call to moodle.org for each of these plugins. It is absolutely not necessary and slows down the page a lot. Also it creates additional load on moodle.org

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              marina Marina Glancy
              Reporter:
              marina Marina Glancy
              Peer reviewer:
              David Mudrák (@mudrd8mz) David Mudrák (@mudrd8mz)
              Integrator:
              Andrew Lyons Andrew Lyons
              Tester:
              Gladys Basiana Gladys Basiana
              Participants:
              Component watchers:
              Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Matteo Scaramuccia, Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              2 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                8/Nov/21

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 day, 2 hours, 30 minutes
                  1d 2h 30m