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

Plugins overview page calls curl unnecessarily

XMLWordPrintable

    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE
    • 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

      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

            marina Marina Glancy
            marina Marina Glancy
            David Mudrák (@mudrd8mz) David Mudrák (@mudrd8mz)
            Andrew Lyons Andrew Lyons
            Gladys Basiana Gladys Basiana
            Votes:
            2 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

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

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.