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

Integrate admin_presets third-party plugin in Moodle LMS

    XMLWordPrintable

    Details

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

      Covered by PHPUnit and behat tests.

      Manual testing

      1. Create a new Moodle site.
      2. As admin go to Site administration > Site admin presets
      3. Confirm they are already 2 presets: Full and Starter.
      4. Open 'Actions' menu for 'Full' preset.
      5. Confirm there is no 'Delete' option (some options could be hidden and you might need to scroll to view the whole menu).
      6. Click on 'Review settings and apply'
      7. Confirm there is a message 'These settings are the same as the current settings; there are no changes to apply.'
      8. Click on Continue.
      9. Open 'Actions' menu for 'Starter' preset.
      10. Confirm there is no 'Delete' option (some options could be hidden and you might need to scroll to view the whole menu).
      11. Click on 'Review settings and apply'
      12. Confirm there is a list of settings to be changed e.g. 'Blog menu' block, 'Enable comments' core setting, 'SCORM package' mod, and many more.
      13. Click on 'Apply'.
      14. Confirm there is a 'Review the following setting changes which have been applied.' message.
      15. Click on Create preset and create a new preset called 'My settings'
      16. Go to Side administration > Advanced features
      17. Confirm 'Enable comments' setting is unchecked
      18. Check 'Enable comments' and Save changes
      19. Go to Site administration > Plugins > Blocks > Manage blocks
      20. Confirm 'Blog menu' is hidden
      21. Show 'Blog menu' block
      22. Go to Side administration > Plugins > Activity modules > Manage activities
      23. Confirm 'SCORM package' is hidden
      24. Show 'SCORM package' activity
      25. Go to Site administration > Site admin presets 
      26. Open 'Actions' menu for 'My settings' preset.
      27. Confirm there is a 'Delete' option (some options could be hidden and you might need to scroll to view the whole menu).
      28. Click on 'Review settings and apply'
      29. Confirm there is a list of settings to be changed that includes 'Blog menu' block, 'Enable comments' core setting and 'SCORM package' mod.
      30. Click on 'Apply'.
      31. Confirm there is a 'Review the following setting changes which have been applied.' message.
      32. Go to Side administration > Advanced features
      33. Confirm 'Enable comments' setting is unchecked
      34. Go to Site administration > Plugins > Blocks > Manage blocks
      35. Confirm 'Blog menu' is hidden
      36. Go to Side administration > Plugins > Activity modules > Manage activities
      37. Confirm 'SCORM package' is hidden
      38. Go to Site administration > Site admin presets 
      39. Open 'Actions' menu for 'My settings' preset.
      40. Confirm there is a 'Show version history' option (some options could be hidden and you might need to scroll to view the whole menu).
      41. Confirm there is a 'Settings successfully restored' message.
      42. Go to Side administration > Advanced features
      43. Confirm 'Enable comments' setting is checked
      44. Go to Site administration > Plugins > Blocks > Manage blocks
      45. Confirm 'Blog menu' is visible
      46. Go to Side administration > Plugins > Activity modules > Manage activities
      47. Confirm 'SCORM package' is visible 

       

      Show
      Covered by PHPUnit and behat tests. Manual testing Create a new Moodle site. As admin go to Site administration > Site admin presets Confirm they are already 2 presets: Full and Starter. Open 'Actions' menu for 'Full' preset. Confirm there is no 'Delete' option (some options could be hidden and you might need to scroll to view the whole menu). Click on 'Review settings and apply' Confirm there is a message 'These settings are the same as the current settings; there are no changes to apply.' Click on Continue. Open 'Actions' menu for 'Starter' preset. Confirm there is no 'Delete' option (some options could be hidden and you might need to scroll to view the whole menu). Click on 'Review settings and apply' Confirm there is a list of settings to be changed e.g. 'Blog menu' block, 'Enable comments' core setting, 'SCORM package' mod, and many more. Click on 'Apply'. Confirm there is a 'Review the following setting changes which have been applied.' message. Click on Create preset and create a new preset called 'My settings' Go to Side administration > Advanced features Confirm 'Enable comments' setting is unchecked Check 'Enable comments' and Save changes Go to Site administration > Plugins > Blocks > Manage blocks Confirm 'Blog menu' is hidden Show 'Blog menu' block Go to Side administration > Plugins > Activity modules > Manage activities Confirm 'SCORM package' is hidden Show 'SCORM package' activity Go to Site administration > Site admin presets  Open 'Actions' menu for 'My settings' preset. Confirm there is a 'Delete' option (some options could be hidden and you might need to scroll to view the whole menu). Click on 'Review settings and apply' Confirm there is a list of settings to be changed that includes 'Blog menu' block, 'Enable comments' core setting and 'SCORM package' mod. Click on 'Apply'. Confirm there is a 'Review the following setting changes which have been applied.' message. Go to Side administration > Advanced features Confirm 'Enable comments' setting is unchecked Go to Site administration > Plugins > Blocks > Manage blocks Confirm 'Blog menu' is hidden Go to Side administration > Plugins > Activity modules > Manage activities Confirm 'SCORM package' is hidden Go to Site administration > Site admin presets  Open 'Actions' menu for 'My settings' preset. Confirm there is a 'Show version history' option (some options could be hidden and you might need to scroll to view the whole menu). Confirm there is a 'Settings successfully restored' message. Go to Side administration > Advanced features Confirm 'Enable comments' setting is checked Go to Site administration > Plugins > Blocks > Manage blocks Confirm 'Blog menu' is visible Go to Side administration > Plugins > Activity modules > Manage activities Confirm 'SCORM package' is visible   
    • Sprint:
      Moppies Kanban

      Description

      As an admin
      I want to load administration presets
      So I can easily switch between different configurations

       This feature is implemented by the third-party plugin "Admin presets": https://moodle.org/plugins/block_admin_presets, created by David Monllaó and maintained by developers from Pimenko.

      This issue is about adapting this third-plugin for getting it integrated into Moodle LMS. 

      Acceptance criteria:

      • The block should be converted from a block to an admin tool.
      • A link "Site admin presets" (pointing to 3rd-party plugin main page) should be displayed in the Site administration.
      • The admin tool should follow the Moodle coding style and policy rules. For instance, these are some of the things to review:
        • Some classes should have a proper namespace (for instance, the ones in the lib folder). They should also probably be moved to the classes folder.
      • The “Auto exclude sensitive settings” setting should be checked by default.
      • The tool_admin_presets setting should be reviewed to confirm it includes all the sensitive settings that have been added recently.
      • Presets should also include plugins visibility, let admins export/preview/load the list of plugins and their visibility.
      • Moodle LMS should include, by default, 2 different flavours in the Admin presets tool: one for "Starter" and another for "Full" --> preinstalled_adminpresets.png:
        • "Starter" will disable most of the settings and plugins in order to make it easier for users to find the most common features.
        • "Full" will include settings and plugins configuration after installing a vanilla Moodle.
      • For new sites, we should consider defaulting to the 'simplified' Moodle configuration. We will need some sort of notification for admins (could even be a simple msg) to let them know this and that they can 'unlock' the full feature set (with link to setting).

       

      Technical information

      • The <PLUGINS> element will be added to the XML file following this format:

      <?xml version="1.0" encoding="UTF-8"?>
      <PRESET>
       <NAME>Demo preset file</NAME>
       <COMMENTS></COMMENTS>
       <PRESET_DATE>1625551825</PRESET_DATE>
       <SITE_URL>http://localhost/m/stable_master-min</SITE_URL>
       <AUTHOR>Admin User</AUTHOR>
       <MOODLE_VERSION>2021070100</MOODLE_VERSION>
       <MOODLE_RELEASE>4.0dev (Build: 20210701)</MOODLE_RELEASE>
       <ADMIN_SETTINGS>
       [...]
       <ENROL_MNET>
       <SETTINGS>
       <ROLEID roleid_adv="1">5</ROLEID>
       </SETTINGS>
       </ENROL_MNET>
       [...]
       </ADMIN_SETTINGS>
      <PLUGINS>
       <ANTIVIRUS>
       <CLAMAV>0</CLAMAV>
       </ANTIVIRUS>
       <ASSIGNFEEDBACK>
       <COMMENTS>1</COMMENTS>
       <EDITPDF>0</EDITPDF>
       <FILE>1</FILE>
       <OFFLINE>0</OFFLINE>
       </ASSIGNFEEDBACK>
       [...]
       <BLOCK>
       <ACCESSREVIEW>0</ACCESSREVIEW>
       <ACTIVITY_MODULES>0</ACTIVITY_MODULES>
       [...]
       </BLOCK>
       <MOD>
       <ASSIGN>1</ASSIGN>
       <ASSIGNMENT>0</ASSIGNMENT>
       <CHAT>0</CHAT>
       </MOD>
       </PLUGINS>
      </PRESET>
      

      • The following tables should be added to store the plugins data:
        • tool_admin_presets_plug
        • tool_admin_presets_app_plug

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sarjona Sara Arjona (@sarjona)
              Reporter:
              sarjona Sara Arjona (@sarjona)
              Peer reviewer:
              Carlos Escobedo Carlos Escobedo
              Integrator:
              Ilya Tregubov Ilya Tregubov
              Tester:
              Gladys Basiana Gladys Basiana
              Participants:
              Component watchers:
              Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              4 Vote for this issue
              Watchers:
              20 Start watching this issue

                Dates

                Created:
                Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 4 weeks, 3 days, 6 hours, 55 minutes
                  4w 3d 6h 55m