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

Plugins overview page calls curl unnecessarily

    XMLWordPrintable

Details

    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE
    • MDL-72515-311
    • MDL-72515-master
    • 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

        1. MDL-72515_Test Passed.PNG
          71 kB
          Gladys Basiana
        2. Screenshot from 2021-09-07 14-10-16.png
          114 kB
          Marina Glancy
        3. Screenshot from 2021-10-04 10-09-37.png
          41 kB
          Marina Glancy

        Issue Links

          Activity

            People

              marina Marina Glancy
              marina Marina Glancy
              David Mudrák (@mudrd8mz) David Mudrák (@mudrd8mz)
              Andrew Lyons Andrew Lyons
              Gladys Basiana Gladys Basiana
              David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo, Matteo Scaramuccia, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              2 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                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