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

Add generic enable_plugin() method in plugininfo

    XMLWordPrintable

    Details

    • Affected Branches:
      MOODLE_400_STABLE
    • Fixed Branches:
      MOODLE_400_STABLE
    • Epic Link:
    • Pull from Repository:
    • Pull Master Branch:
      MDL-72720-master
    • Testing Instructions:
      Hide

      Setup

      1. Login as admin

      Testing scenario: Antivirus

      1. Go to "Site administration > Plugins > Manage antivirus plugins".
      2. Enable ClamAV antivirus.
      3. Check the plugin is enabled (the eye icon should be blue).
      4. Disable ClamAV antivirus.
      5. Check the plugin is disabled (the eye icon should be grey and slashed).
      6. Go to "Site administration > Reports > Config changes".
      7. Check these changes are displayed in the log.

      Testing scenario: Authentication

      1. Go to "Site administration > Plugins > Manage authentication".
      2. Set "Self registration" to "Email-based self-registration" and Save changes.
      3. Disable "Email-based self-registration".
      4. Check the grey and slashed eye icon is displayed for it and also that "Self registration" setting is set to "Disabled".
      5. Enable and disable a few more plugins.
      6. Check the blue eye icon is displayed when a plugin is enabled and a grey and slashed eye icon appears when it's disabled.
      7. Go to "Site administration > Reports > Config changes".
      8. Check these changes are displayed in the log.

      Testing scenario: Availability

      Covered by pre-existing behat. 

      Testing scenario: Block

      1. Go to "Site administration > Plugins > Manage blocks".
      2. Enable and disable a few plugins.
      3. Check the blue eye icon is displayed when a plugin is enabled and a grey and slashed eye icon appears when it's disabled.
      4. Go to "Site administration > Reports > Config changes".
      5. Check these changes are displayed in the log.

      Testing scenario: Content type (from Content bank)

      1. Go to "Site administration > Plugins > Manage content types".
      2. Disable H5P.
      3. Check the plugin is disabled (the eye icon should be grey and slashed).
      4. Enable H5P.
      5. Check the plugin is enabled (the eye icon should be blue).
      6. Go to "Site administration > Reports > Config changes".
      7. Check these changes are displayed in the log.

      Testing scenario: Custom fields

      1. Go to "Site administration > Plugins > Manage custom field types".
      2. Enable and disable a few plugins.
      3. Check the blue eye icon is displayed when a plugin is enabled and a grey and slashed eye icon appears when it's disabled.
      4. Go to "Site administration > Reports > Config changes".
      5. Check these changes are displayed in the log.

      Testing scenario: Data formats

      1. Go to "Site administration > Plugins > Manage custom field types".
      2. Enable and disable a few plugins.
      3. Check the blue eye icon is displayed when a plugin is enabled and a grey and slashed eye icon appears when it's disabled.
      4. Go to "Site administration > Reports > Config changes".
      5. Check these changes are displayed in the log.

      Testing scenario: Activity modules

      1. Go to "Site administration > Plugins > Manage activities".
      2. Enable and disable a few plugins.
      3. Check the blue eye icon is displayed when a plugin is enabled and a grey and slashed eye icon appears when it's disabled.
      4. Go to "Site administration > Reports > Config changes".
      5. Check these changes are displayed in the log.

      Testing scenario: Assignment submission

      1. Go to "Site administration > Plugins > Manage assignment submission plugins".
      2. Enable and disable a few plugins.
      3. Check the blue eye icon is displayed when a plugin is enabled and a grey and slashed eye icon appears when it's disabled.
      4. Go to "Site administration > Reports > Config changes".
      5. Check these changes are displayed in the log.

      Testing scenario: Assignment feedback

      1. Go to "Site administration > Plugins > Manage assignment feedback plugins".
      2. Enable and disable a few plugins.
      3. Check the blue eye icon is displayed when a plugin is enabled and a grey and slashed eye icon appears when it's disabled.
      4. Go to "Site administration > Reports > Config changes".
      5. Check these changes are displayed in the log.

      Testing scenario: Editor

      1. Go to "Site administration > Plugins > Manage editors".
      2. Enable and disable a few plugins.
      3. Check the blue eye icon is displayed when a plugin is enabled and a grey and slashed eye icon appears when it's disabled.
      4. Go to "Site administration > Reports > Config changes".
      5. Check these changes are displayed in the log.

      Testing scenario: File converter

      1. Go to "Site administration > Plugins > Manage document converters".
      2. Enable and disable a few plugins.
      3. Check the blue eye icon is displayed when a plugin is enabled and a grey and slashed eye icon appears when it's disabled.
      4. Go to "Site administration > Reports > Config changes".
      5. Check these changes are displayed in the log.

      Testing scenario: Payment gateways

      1. Go to "Site administration > Plugins > Manage payment gateways".
      2. Enable and disable the PayPal plugin.
      3. Check the blue eye icon is displayed when a plugin is enabled and a grey and slashed eye icon appears when it's disabled.
      4. Go to "Site administration > Reports > Config changes".
      5. Check these changes are displayed in the log.

      Testing scenario: Media

      1. Go to "Site administration > Plugins > Manage media players".
      2. Enable the "HTML5 audio" player.
      3. Check the blue icon is displayed now for it.
      4. Enable the "HTML5 video" player.
      5. Check the blue icon is displayed now for it and it appears above the "HTML5 audio" player.
      6. Enable and disable a few plugins.
      7. Check the blue eye icon is displayed when a plugin is enabled and a grey and slashed eye icon appears when it's disabled.
      8. Go to "Site administration > Reports > Config changes".
      9. Check these changes are displayed in the log.

      Testing scenario: Filter

      1. Go to "Site administration > Plugins > Manage filter".
      2. Change the value in the "Active?" column for a few plugins.
      3. Check the page is reloaded and the value selected in the "Active?" drop-down for the plugin is saved.
      4. Go to "Site administration > Reports > Config changes".
      5. Check these changes are displayed in the log.

      Testing scenario: Course formats

      1. Go to "Site administration > Plugins > Manage course formats".
      2. Enable and disable a few plugins.
      3. Check the blue eye icon is displayed when a plugin is enabled and a grey and slashed eye icon appears when it's disabled.
      4. Go to "Site administration > Reports > Config changes".
      5. Check these changes are displayed in the log.

      Testing scenario: Notification plugins

      1. Go to "Site administration > Messaging > Notification settings".
      2. Enable and disable a few notification plugins (Web, Email and Mobile). Don't forget to click the "Save changes" button.
      3. Check the page is reloaded and the value selected in the "Enable" column is saved.
      4. Go to "Site administration > Reports > Config changes".
      5. Check these changes are displayed in the log. In that particular case, other settings will be displayed too, apart from the ones for plugin='core' and setting='popup|email|mobile'.

      Testing scenario: Portfolios

      1. Go to "Site administration > Plugins > Manage course formats".
      2. Set the GoogleDrive portfolio to "Enabled but hidden". You can put anything in the clientID and secret fields (such as 'xxxx').
      3. Check "Google Drive" portfolio now displays the "Enabled but hidden" option selected.
      4. Set "Google Drive" to "Enabled and visible".
      5. Check the page is reloaded and the "Google Drive" portfolio now displays the "Enabled and visible" option selected.
      6. Go to "Site administration > Reports > Config changes".
      7. Check this last change is displayed in the log.

      Testing scenario: Question bank

      Covered by pre-existing behat. 

      Testing scenario: Question behaviours

      1. Go to "Site administration > Plugins > Manage question behaviours".
      2. Enable and disable a few plugins.
      3. Check the blue eye icon is displayed when a plugin is enabled and a grey and slashed eye icon appears when it's disabled.
      4. Go to "Site administration > Reports > Config changes".
      5. Check these changes are displayed in the log.

      Testing scenario: Question types

      1. Go to "Site administration > Plugins > Manage question types".
      2. Enable and disable a few plugins.
      3. Check the blue eye icon is displayed when a plugin is enabled and a grey and slashed eye icon appears when it's disabled.
      4. Go to "Site administration > Reports > Config changes".
      5. Check these changes are displayed in the log.

      Testing scenario: Repositories

      1. Go to "Site administration > Plugins > Manage repositories".
      2. Set the "Content bank" repository to "Enabled but hidden". 
      3. Check the page is reloaded and the "Content bank" repository now is set to the "Enabled but hidden" option.
      4. Set it back to "Enabled and visible"
      5. Check the page is reloaded and the "Content bank" repository now is set to the "Enabled and visible" option.
      6. Go to "Site administration > Reports > Config changes".
      7. Check this last change is displayed in the log.

      Testing scenario: Webservice protocols

      1. Go to "Site administration > Server > Manage protocols".
      2. Enable and disable a few protocols.
      3. Check the blue eye icon is displayed when a plugin is enabled and a grey and slashed eye icon appears when it's disabled.
      4. Go to "Site administration > Reports > Config changes".
      5. Check these changes are displayed in the log.

      Testing scenario: Log stores

      Covered by pre-existing behat. 

      Testing scenario: TinyMCE HTML editor plugins

      1. Go to "Site administration > Plugins > TinyMCE HTML editor > General settings".
      2. Enable and disable a few plugins.
      3. Check the blue eye icon is displayed when a plugin is enabled and a grey and slashed eye icon appears when it's disabled.
      4. Go to "Site administration > Reports > Config changes".
      5. Check these changes are displayed in the log.
      Show
      Setup Login as admin Testing scenario: Antivirus Go to "Site administration > Plugins > Manage antivirus plugins". Enable ClamAV antivirus. Check the plugin is enabled (the eye icon should be blue). Disable ClamAV antivirus. Check the plugin is disabled (the eye icon should be grey and slashed). Go to "Site administration > Reports > Config changes". Check these changes are displayed in the log. Testing scenario: Authentication Go to "Site administration > Plugins > Manage authentication". Set "Self registration" to "Email-based self-registration" and Save changes. Disable "Email-based self-registration". Check the grey and slashed eye icon is displayed for it and also that "Self registration" setting is set to "Disabled". Enable and disable a few more plugins. Check the blue eye icon is displayed when a plugin is enabled and a grey and slashed eye icon appears when it's disabled. Go to "Site administration > Reports > Config changes". Check these changes are displayed in the log. Testing scenario: Availability Covered by pre-existing behat.  Testing scenario: Block Go to "Site administration > Plugins > Manage blocks". Enable and disable a few plugins. Check the blue eye icon is displayed when a plugin is enabled and a grey and slashed eye icon appears when it's disabled. Go to "Site administration > Reports > Config changes". Check these changes are displayed in the log. Testing scenario: Content type (from Content bank) Go to "Site administration > Plugins > Manage content types". Disable H5P. Check the plugin is disabled (the eye icon should be grey and slashed). Enable H5P. Check the plugin is enabled (the eye icon should be blue). Go to "Site administration > Reports > Config changes". Check these changes are displayed in the log. Testing scenario: Custom fields Go to "Site administration > Plugins > Manage custom field types". Enable and disable a few plugins. Check the blue eye icon is displayed when a plugin is enabled and a grey and slashed eye icon appears when it's disabled. Go to "Site administration > Reports > Config changes". Check these changes are displayed in the log. Testing scenario: Data formats Go to "Site administration > Plugins > Manage custom field types". Enable and disable a few plugins. Check the blue eye icon is displayed when a plugin is enabled and a grey and slashed eye icon appears when it's disabled. Go to "Site administration > Reports > Config changes". Check these changes are displayed in the log. Testing scenario: Activity modules Go to "Site administration > Plugins > Manage activities". Enable and disable a few plugins. Check the blue eye icon is displayed when a plugin is enabled and a grey and slashed eye icon appears when it's disabled. Go to "Site administration > Reports > Config changes". Check these changes are displayed in the log. Testing scenario: Assignment submission Go to "Site administration > Plugins > Manage assignment submission plugins". Enable and disable a few plugins. Check the blue eye icon is displayed when a plugin is enabled and a grey and slashed eye icon appears when it's disabled. Go to "Site administration > Reports > Config changes". Check these changes are displayed in the log. Testing scenario: Assignment feedback Go to "Site administration > Plugins > Manage assignment feedback plugins". Enable and disable a few plugins. Check the blue eye icon is displayed when a plugin is enabled and a grey and slashed eye icon appears when it's disabled. Go to "Site administration > Reports > Config changes". Check these changes are displayed in the log. Testing scenario: Editor Go to "Site administration > Plugins > Manage editors". Enable and disable a few plugins. Check the blue eye icon is displayed when a plugin is enabled and a grey and slashed eye icon appears when it's disabled. Go to "Site administration > Reports > Config changes". Check these changes are displayed in the log. Testing scenario: File converter Go to "Site administration > Plugins > Manage document converters". Enable and disable a few plugins. Check the blue eye icon is displayed when a plugin is enabled and a grey and slashed eye icon appears when it's disabled. Go to "Site administration > Reports > Config changes". Check these changes are displayed in the log. Testing scenario: Payment gateways Go to "Site administration > Plugins > Manage payment gateways". Enable and disable the PayPal plugin. Check the blue eye icon is displayed when a plugin is enabled and a grey and slashed eye icon appears when it's disabled. Go to "Site administration > Reports > Config changes". Check these changes are displayed in the log. Testing scenario: Media Go to "Site administration > Plugins > Manage media players". Enable the "HTML5 audio" player. Check the blue icon is displayed now for it. Enable the "HTML5 video" player. Check the blue icon is displayed now for it and it appears above the "HTML5 audio" player. Enable and disable a few plugins. Check the blue eye icon is displayed when a plugin is enabled and a grey and slashed eye icon appears when it's disabled. Go to "Site administration > Reports > Config changes". Check these changes are displayed in the log. Testing scenario: Filter Go to "Site administration > Plugins > Manage filter". Change the value in the "Active?" column for a few plugins. Check the page is reloaded and the value selected in the "Active?" drop-down for the plugin is saved. Go to "Site administration > Reports > Config changes". Check these changes are displayed in the log. Testing scenario: Course formats Go to "Site administration > Plugins > Manage course formats". Enable and disable a few plugins. Check the blue eye icon is displayed when a plugin is enabled and a grey and slashed eye icon appears when it's disabled. Go to "Site administration > Reports > Config changes". Check these changes are displayed in the log. Testing scenario: Notification plugins Go to "Site administration > Messaging > Notification settings". Enable and disable a few notification plugins (Web, Email and Mobile). Don't forget to click the "Save changes" button. Check the page is reloaded and the value selected in the "Enable" column is saved. Go to "Site administration > Reports > Config changes". Check these changes are displayed in the log. In that particular case, other settings will be displayed too, apart from the ones for plugin='core' and setting='popup|email|mobile'. Testing scenario: Portfolios Go to "Site administration > Plugins > Manage course formats". Set the GoogleDrive portfolio to "Enabled but hidden". You can put anything in the clientID and secret fields (such as 'xxxx'). Check "Google Drive" portfolio now displays the "Enabled but hidden" option selected. Set "Google Drive" to "Enabled and visible". Check  the page is reloaded and the "Google Drive" portfolio now displays the "Enabled and visible" option selected. Go to "Site administration > Reports > Config changes". Check this last change is displayed in the log. Testing scenario: Question bank Covered by pre-existing behat.  Testing scenario: Question behaviours Go to "Site administration > Plugins > Manage question behaviours". Enable and disable a few plugins. Check the blue eye icon is displayed when a plugin is enabled and a grey and slashed eye icon appears when it's disabled. Go to "Site administration > Reports > Config changes". Check these changes are displayed in the log. Testing scenario: Question types Go to "Site administration > Plugins > Manage question types". Enable and disable a few plugins. Check the blue eye icon is displayed when a plugin is enabled and a grey and slashed eye icon appears when it's disabled. Go to "Site administration > Reports > Config changes". Check these changes are displayed in the log. Testing scenario: Repositories Go to "Site administration > Plugins > Manage repositories". Set the "Content bank" repository to "Enabled but hidden".  Check  the page is reloaded and the "Content bank" repository now is set to the "Enabled but hidden" option. Set it back to "Enabled and visible" Check  the page is reloaded and the "Content bank" repository now is set to the "Enabled and visible" option. Go to "Site administration > Reports > Config changes". Check this last change is displayed in the log. Testing scenario: Webservice protocols Go to "Site administration > Server > Manage protocols". Enable and disable a few protocols. Check the blue eye icon is displayed when a plugin is enabled and a grey and slashed eye icon appears when it's disabled. Go to "Site administration > Reports > Config changes". Check these changes are displayed in the log. Testing scenario: Log stores Covered by pre-existing behat.  Testing scenario: TinyMCE HTML editor plugins Go to "Site administration > Plugins > TinyMCE HTML editor > General settings". Enable and disable a few plugins. Check the blue eye icon is displayed when a plugin is enabled and a grey and slashed eye icon appears when it's disabled. Go to "Site administration > Reports > Config changes". Check these changes are displayed in the log.
    • Sprint:
      Moppies Kanban

      Description

      While working in MDL-72112 to add support to bulk enable/disable plugins I've realised there is no method in the plugininfo API to enable/disable plugins.

      This issue is to add the enable_plugin($pluginname, $enabled) method to core_plugininfo\base and implement it in all the plugins supporting the enabled/disabled feature.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sarjona Sara Arjona (@sarjona)
              Reporter:
              sarjona Sara Arjona (@sarjona)
              Peer reviewer:
              Ferran Recio Ferran Recio
              Integrator:
              Shamim Rezaie Shamim Rezaie
              Tester:
              Gladys Basiana Gladys Basiana
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 4 days, 1 hour, 16 minutes
                  4d 1h 16m