Moodle
  1. Moodle
  2. MDL-26784

Missing list of all installed plugins

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.2
    • Fix Version/s: 2.1
    • Component/s: Administration
    • Labels:
    • Difficulty:
      Moderate
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE
    • Rank:
      16483

      Description

      During the upgrade, only the lists of present activity modules, text filters and blocks are displayed. But this plugins check screen does not provide full information about the plugins status (which of them are going to be installed or upgraded). Also, we have much more plugin types in Moodle and we should provide a complete overview of them all. For some plugin types (typically activity modules' subplugins), we do not have admin interface at all.

      Use cases:
      1. During the upgrade, the administrator can see the list of all present plugins categorized by type
      2. During the upgrade, the following information should be available for every single plugin: the source of the plugin (standard part of Moodle vs non-standard exension), currently installed version, source code version and location, status (new, needs upgrade, ...)
      3. Display a list of all currently installed plugins, their availability (enabled / disabled) and with links to plugin-specific actions (setting, uninstall)
      4. Display a unique identifier for each plugin so that admins can use it when reporting issues without the need to know what is the English name of the plugin

      Most of the necasary underlying logic has already been implemented for 2.0. We just have to provide user interface for this. To implement this user interface, the following is needed:

      • Have a library providing unified access to the meta-information about all plugin types. Such library must abstract from minor differences among various plugin types
      • Have the names of all plugin types (activity modules, filters, blocks, assignment types etc) as strings, ideally with computable identifiers. Some of these are already defined in various strings and we can re-use them thanks to AMOS and its CPY instruction
      1. missing_icons.jpg
        111 kB
      2. plugin_manager.jpg
        81 kB
      3. screenshot0.png
        95 kB

        Issue Links

        Progress
        Resolved Sub-Tasks

        Sub-Tasks

        There are no Sub-Tasks for this issue.

          Activity

          Hide
          David Mudrak added a comment -

          Example of the new plugins check screen, highlighting the status of some plugins

          Show
          David Mudrak added a comment - Example of the new plugins check screen, highlighting the status of some plugins
          Hide
          David Mudrak added a comment -

          Example of the new plugins overview screen that displays information about installed subplugins and local plugins

          Show
          David Mudrak added a comment - Example of the new plugins overview screen that displays information about installed subplugins and local plugins
          Hide
          David Mudrak added a comment -

          The patch that implements this is now available at https://github.com/mudrd8mz/moodle/tree/MDL-26784-plugin-manager

          To test various features of the new plugins check screen, do the following:

          1. edit /mod/workshop/version.php and increase the $module->version to stimulate upgrade
          2. rename /mod/chat to /mod/.chat to simulate a module missing from disk
          3. go to your /mod folder and run `git clone https://github.com/skodak/moodle-mod_book.git book` to have a new module available
          4. go to your /admin page
          5. TEST: make sure that the list of all present plugins categorized by their type is available
          6. TEST: make sure that the status 'upgrade needed' of the Workshop is indicated
          7. TEST: make sure that the status 'to be installed' of the Book is indicated
          8. TEST: make sure that the status 'missing from disk' of the Chat is indicated
          9. return workshop version to the original value, rename .chat back to chat and remove the book

          To test the new 'Plugin management' control panel, go to the new Site admin > Plugins > Manage plugins

          1. TEST: make sure that the information about the installed plugins and their availability is provided
          2. TEST: make sure that the links to the Settings and Uninstall screens work (clicking the link is safe, it does not actually uninstall anything)

          Show
          David Mudrak added a comment - The patch that implements this is now available at https://github.com/mudrd8mz/moodle/tree/MDL-26784-plugin-manager To test various features of the new plugins check screen, do the following: 1. edit /mod/workshop/version.php and increase the $module->version to stimulate upgrade 2. rename /mod/chat to /mod/.chat to simulate a module missing from disk 3. go to your /mod folder and run `git clone https://github.com/skodak/moodle-mod_book.git book` to have a new module available 4. go to your /admin page 5. TEST: make sure that the list of all present plugins categorized by their type is available 6. TEST: make sure that the status 'upgrade needed' of the Workshop is indicated 7. TEST: make sure that the status 'to be installed' of the Book is indicated 8. TEST: make sure that the status 'missing from disk' of the Chat is indicated 9. return workshop version to the original value, rename .chat back to chat and remove the book To test the new 'Plugin management' control panel, go to the new Site admin > Plugins > Manage plugins 1. TEST: make sure that the information about the installed plugins and their availability is provided 2. TEST: make sure that the links to the Settings and Uninstall screens work (clicking the link is safe, it does not actually uninstall anything)
          Hide
          David Mudrak added a comment -

          Ping: Martin, guys will probably require your approval for this. It is ready to be integrated.

          Show
          David Mudrak added a comment - Ping: Martin, guys will probably require your approval for this. It is ready to be integrated.
          Hide
          Tim Hunt added a comment -

          Would be much more useful if it just showed things that will be upgraded/installed. The list of all plugins will be huge, and there is no point listing things that are up-to-date.

          Well, if you insist, you could add a single row to the each section of the table, E.g.

          Modules that are currently up-to-date: Forum, Quiz, Wiki, ...

          that takes up minimal space.

          Show
          Tim Hunt added a comment - Would be much more useful if it just showed things that will be upgraded/installed. The list of all plugins will be huge, and there is no point listing things that are up-to-date. Well, if you insist, you could add a single row to the each section of the table, E.g. Modules that are currently up-to-date: Forum, Quiz, Wiki, ... that takes up minimal space.
          Hide
          David Mudrak added a comment -

          Thanks for your suggestion Tim. Yes, the screen is actually pretty long. Although as an admin I personally prefer having the complete overview with interesting lines highlighted, I can see your point. There is an issue, though. For plugins that do not use versioning, we are unable to recognize their status. That is, we are unable to say if they are new or up-to-date. And even if they are not highlighted, I prefer having them listed so the admin has at least a chance to spot them.

          Anyway, as the complete overview is available via Site admin > Plugins > Manage plugins, I have no problems with whatever of the following variants for the Plugins check screen during the upgrade:

          • full lists as it is now
          • do not render rows for "up-to-date" and "no database" plugins
          • render them but use some simple javascript to hide them by default, similarly to what we have for Advanced fields in mforms

          Let us ask Martin for the final decision of this.

          Show
          David Mudrak added a comment - Thanks for your suggestion Tim. Yes, the screen is actually pretty long. Although as an admin I personally prefer having the complete overview with interesting lines highlighted, I can see your point. There is an issue, though. For plugins that do not use versioning, we are unable to recognize their status. That is, we are unable to say if they are new or up-to-date. And even if they are not highlighted, I prefer having them listed so the admin has at least a chance to spot them. Anyway, as the complete overview is available via Site admin > Plugins > Manage plugins, I have no problems with whatever of the following variants for the Plugins check screen during the upgrade: full lists as it is now do not render rows for "up-to-date" and "no database" plugins render them but use some simple javascript to hide them by default, similarly to what we have for Advanced fields in mforms Let us ask Martin for the final decision of this.
          Hide
          Petr Škoda added a comment -

          +1

          Show
          Petr Škoda added a comment - +1
          Hide
          Martin Dougiamas added a comment -

          +1 from me for a report that shows this (as well as the upgrade page) assuming that:

          • we remove version info from pages like activity overview settings, and link to them from this report, to keep the two things clearly separate
          • we have a "check for updates" button that calls the new Plugins database on moodle.org
          Show
          Martin Dougiamas added a comment - +1 from me for a report that shows this (as well as the upgrade page) assuming that: we remove version info from pages like activity overview settings, and link to them from this report, to keep the two things clearly separate we have a "check for updates" button that calls the new Plugins database on moodle.org
          Hide
          David Mudrak added a comment -

          A patchset submitted for review and integration. Thanks for all pre-integration comments and ideas.

          Show
          David Mudrak added a comment - A patchset submitted for review and integration. Thanks for all pre-integration comments and ideas.
          Hide
          Dongsheng Cai added a comment - - edited

          I saw a huge space when upgrade, 'Show all plugins' will make the rows visible, but without clicking it looks like something going wrong. And saw a lot components icons (theme format report etc...) are missing in the table, probably those components don't support icons at all.

          Show
          Dongsheng Cai added a comment - - edited I saw a huge space when upgrade, 'Show all plugins' will make the rows visible, but without clicking it looks like something going wrong. And saw a lot components icons (theme format report etc...) are missing in the table, probably those components don't support icons at all.
          Hide
          Dongsheng Cai added a comment -

          This patch broke 1.9 upgrade, it trying to read 'filter_active' table before upgrade, the table doesn't exist in moodle 1.9.

          Show
          Dongsheng Cai added a comment - This patch broke 1.9 upgrade, it trying to read 'filter_active' table before upgrade, the table doesn't exist in moodle 1.9.
          Hide
          Dongsheng Cai added a comment -

          Sorry for reopening, this patch needs to cope with 1.9 upgrade.

          Show
          Dongsheng Cai added a comment - Sorry for reopening, this patch needs to cope with 1.9 upgrade.
          Hide
          Martin Dougiamas added a comment -

          1) Yes that empty table looks bad. It should show something by default.

          2) The missing icons also look bad. I think the code should look for the icons first, and show a placeholder if none exist yet. Adding them later is a different issue. The quickest fix for this week would be to just take out all icons from that display, I don't think they are crucial. And later on add them in with better logic.

          Show
          Martin Dougiamas added a comment - 1) Yes that empty table looks bad. It should show something by default. 2) The missing icons also look bad. I think the code should look for the icons first, and show a placeholder if none exist yet. Adding them later is a different issue. The quickest fix for this week would be to just take out all icons from that display, I don't think they are crucial. And later on add them in with better logic.
          Hide
          David Mudrak added a comment -

          Thanks everyone who reported issues detected during the testing. The submitted patch was removed from the integration.git today and PULL-478 rejected as agreed.

          I have a new version of the patch that fixes the problems detected during the testing:

          • lib/pluginlib.php checks if {filter_active}

            already exists before it calls filter_get_global_states()

          • the renderer asks the theme if the icon is available before it produces <img> tag for it
          • the whole idea of showing and hiding the table rows via JS was dropped and reimplemented via standard page reload. This makes the page loading significantly better because we do not render the whole table if the user does not ask for it. The general usability should be better now.

          I would really appreciate if you find time to look at the patch again later this week. I am going to maintain a branch for it (see
          https://github.com/mudrd8mz/moodle/compare/master...WIP-MDL-26784-plugin-manager) and I will consider re-submitting it for integration on Friday. Thanks in advance.

          Side notes:

          • collapsible table rows via JS is a hell if you want to support IE7, IE8, Firefox, Chrome and Safari
          • html_writer::table is a hell for longer tables
          Show
          David Mudrak added a comment - Thanks everyone who reported issues detected during the testing. The submitted patch was removed from the integration.git today and PULL-478 rejected as agreed. I have a new version of the patch that fixes the problems detected during the testing: lib/pluginlib.php checks if {filter_active} already exists before it calls filter_get_global_states() the renderer asks the theme if the icon is available before it produces <img> tag for it the whole idea of showing and hiding the table rows via JS was dropped and reimplemented via standard page reload. This makes the page loading significantly better because we do not render the whole table if the user does not ask for it. The general usability should be better now. I would really appreciate if you find time to look at the patch again later this week. I am going to maintain a branch for it (see https://github.com/mudrd8mz/moodle/compare/master...WIP-MDL-26784-plugin-manager ) and I will consider re-submitting it for integration on Friday. Thanks in advance. Side notes: collapsible table rows via JS is a hell if you want to support IE7, IE8, Firefox, Chrome and Safari html_writer::table is a hell for longer tables
          Hide
          Helen Foster added a comment -

          This issue is fixed in the latest 2.1dev. Thanks David

          Show
          Helen Foster added a comment - This issue is fixed in the latest 2.1dev. Thanks David

            People

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

              Dates

              • Created:
                Updated:
                Resolved: