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

Plugins overview page: filter the plugin list with javascript

XMLWordPrintable

    • MOODLE_405_STABLE
    • MOODLE_405_STABLE
    • Hide

      It is tricky to properly test on the 'main' branch since this version is not registered yet in plugins directory and does not have new plugin notifications. You will need to modify the code to test it.

      1. Make sure to purge caches before testing (this patch modified the JS files)
      2. Login as admin and go to Site administration>Plugins>Plugins overview
      3. Make sure you can see the links "All plugins" and "Additional plugins", you should see the "Additional plugins" even if you do not have any add-ons, then the number in the badge will be "0"
      4. Install some additional plugins from moodle.org/plugins but not the latest version , for example https://moodle.org/plugins/local_moodlecheck/1.3.0-deprecation-begins/31312
      5. Return to the "Plugins overview" page and make sure you can filter by the additional plugins or view all plugins, filtering works in the JS
      6. Remove the folder local/moodlecheck and run upgrade script
      7. Return to the "Plugins overview" page and make sure that you can now see "Missing plugins" link and you can filter and view only missing plugins.
      8. Leave the "Plugins overview" page open in the browser
      9. Add code for another plugin, for example https://moodle.org/plugins/local_codechecker but do not run upgrade
      10. Purge caches and refresh the "Plugins overview" page
      11. Make sure that you see a "To be installed" link, you can click on it and filter the plugins that need to be installed
      12. Either install this plugin or remove the code, otherwise you will be redirected to the upgrade page later

      Checking for updates

      1. Add back the code for local_moodlecheck of the previous version, run upgrade
      2. Edit the version.php file and change the $release and $branch to previous branch, for example

        $release  = '4.4.3 (Build: 20240712)';
        $branch   = '404';
        

      3. Run scheduled task

        sudo -u www-data php admin/cli/scheduled_task.php --execute=core\\task\\check_for_updates_task

      4. Return to the "Plugins overview" page
      5. Make sure you can see the link "Available updates", click on it and filter by the plugins that have updates
      6. Make the folder local/moodlecheck writable

        chmod -R a+w local

      7. Return to the "Plugins overview" page
      8. Make sure you can see the "Install available updates" button
      9. Install updates, make sure it works fine
      10. Uninstall add-on plugin from this page, make sure there are no errors
      11. Remember to revert changes to version.php
      Show
      It is tricky to properly test on the 'main' branch since this version is not registered yet in plugins directory and does not have new plugin notifications. You will need to modify the code to test it. Make sure to purge caches before testing (this patch modified the JS files) Login as admin and go to Site administration>Plugins>Plugins overview Make sure you can see the links "All plugins" and "Additional plugins", you should see the "Additional plugins" even if you do not have any add-ons, then the number in the badge will be "0" Install some additional plugins from moodle.org/plugins but not the latest version , for example https://moodle.org/plugins/local_moodlecheck/1.3.0-deprecation-begins/31312 Return to the "Plugins overview" page and make sure you can filter by the additional plugins or view all plugins, filtering works in the JS Remove the folder local/moodlecheck and run upgrade script Return to the "Plugins overview" page and make sure that you can now see "Missing plugins" link and you can filter and view only missing plugins. Leave the "Plugins overview" page open in the browser Add code for another plugin, for example https://moodle.org/plugins/local_codechecker but do not run upgrade Purge caches and refresh the "Plugins overview" page Make sure that you see a "To be installed" link, you can click on it and filter the plugins that need to be installed Either install this plugin or remove the code, otherwise you will be redirected to the upgrade page later Checking for updates Add back the code for local_moodlecheck of the previous version, run upgrade Edit the version.php file and change the $release and $branch to previous branch, for example $release = '4.4.3 (Build: 20240712)'; $branch = '404'; Run scheduled task sudo -u www-data php admin/cli/scheduled_task.php --execute=core\\task\\check_for_updates_task Return to the "Plugins overview" page Make sure you can see the link "Available updates", click on it and filter by the plugins that have updates Make the folder local/moodlecheck writable chmod -R a+w local Return to the "Plugins overview" page Make sure you can see the "Install available updates" button Install updates, make sure it works fine Uninstall add-on plugin from this page, make sure there are no errors Remember to revert changes to version.php
    • 3

      I'm suggesting a little improvement to the "Plugins overview" page: instead of reloading the page when you click on "All plugin" and "Additional plugins" - filter the table with the javascript.

      Currently the table has the filters "All plugins", "Additional plugins", "Available updates".

      I suggest also adding filters for "Missing from disk" and "To be installed".

      This is suggested by Workplace team, so we can improve how filtering works on this page and it would be easier for us to add a custom filtering by "Workplace plugins" only in workplace.

        1. (1) 11 Passed -- (Main)MDL-82283.png
          (1) 11 Passed -- (Main)MDL-82283.png
          107 kB
        2. (2) 10 Passed -- (Main)MDL-82283.png
          (2) 10 Passed -- (Main)MDL-82283.png
          83 kB
        3. (2) 8 Passed -- (Main)MDL-82283.png
          (2) 8 Passed -- (Main)MDL-82283.png
          83 kB
        4. Additional plugins.png
          Additional plugins.png
          15 kB
        5. allfilters.png
          allfilters.png
          41 kB
        6. All plugins, additional plugins.png
          All plugins, additional plugins.png
          8 kB
        7. Available updates.png
          Available updates.png
          26 kB
        8. Missing from disk.png
          Missing from disk.png
          16 kB
        9. Missing from disk but still in additional plugins.png
          Missing from disk but still in additional plugins.png
          16 kB
        10. missingplugin_main.png
          missingplugin_main.png
          53 kB
        11. missingplugins_branch.png
          missingplugins_branch.png
          59 kB
        12. noadditionalplugins_branch.png
          noadditionalplugins_branch.png
          43 kB
        13. noadditionalplugins_main.png
          noadditionalplugins_main.png
          38 kB
        14. To be installed.png
          To be installed.png
          16 kB

            marina Marina Glancy
            marina Marina Glancy
            Sebastian Gundersen Sebastian Gundersen
            Safat Shahin Safat Shahin
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            0 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, 5 hours, 41 minutes
                1d 5h 41m

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