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

Course management: Add friction message on hide category

XMLWordPrintable

    • MOODLE_405_STABLE
    • MOODLE_500_STABLE
    • MDL-83840-main
    • Hide

      Covered by Behat tests.

       

      For manual testing:

      1. Go to the course management screen (Site administration > Courses > Manage courses and categories)
      2. Find or create a category with no courses in
      3. Try to hide the category
      4. Verify that no popup appears and the category is successfully hidden
      5. Click on the 'Show' icon to un-hide the category
      6. Add one or more subcategories
      7. Add some courses to the category and its subcategories
      8. Try to hide the category again
      9. Verify that a popup appears and the number of courses mentioned in the popup is equal to the number of courses in the category and its subcategories
      10. Cancel the popup
      11. Verify that the category does not get hidden
      12. Try to hide the category again
      13. Press 'Hide' in the popup
      14. Verify that the category and its subcategories are successfully hidden
      Show
      Covered by Behat tests.   For manual testing: Go to the course management screen (Site administration > Courses > Manage courses and categories) Find or create a category with no courses in Try to hide the category Verify that no popup appears and the category is successfully hidden Click on the 'Show' icon to un-hide the category Add one or more subcategories Add some courses to the category and its subcategories Try to hide the category again Verify that a popup appears and the number of courses mentioned in the popup is equal to the number of courses in the category and its subcategories Cancel the popup Verify that the category does not get hidden Try to hide the category again Press 'Hide' in the popup Verify that the category and its subcategories are successfully hidden
    • Hide

      Code verified against automated checks with warnings.

      Checked MDL-83840 using repository: https://github.com/clransom/moodle.git

      Should these errors be fixed?

      Built on: Wed Mar 19 06:50:26 UTC 2025

      Show
      Code verified against automated checks with warnings. Checked MDL-83840 using repository: https://github.com/clransom/moodle.git main (0 errors / 1 warnings) [branch: MDL-83840-main | CI Job ] overview (0/0) , phplint (0/0) , phpcs (0/1) , js (0/0) , css (0/0) , phpdoc (0/0) , commit (0/0) , savepoint (0/0) , thirdparty (0/0) , externalbackup (0/0) , grunt (0/0) , shifter (0/0) , mustache (0/0) , gherkin (0/0) , Should these errors be fixed? Built on: Wed Mar 19 06:50:26 UTC 2025
    • Hide

      Launching automatic jobs for branch MDL-83840-main

      Built on: Wed Feb 26 05:36:46 AM UTC 2025

      Show
      Launching automatic jobs for branch MDL-83840 -main https://ci.moodle.org/view/Testing/job/DEV.02%20-%20Developer-requested%20PHPUnit/18356/ PHPUnit (sqlsrv / complete) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/62820/ Behat (NonJS - boost and classic / complete) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/62821/ Behat (Firefox - boost / complete) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/62822/ Behat (Firefox - classic / complete) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/62823/ App tests (stable app version) / complete) --> unrelated, please ignore. Built on: Wed Feb 26 05:36:46 AM UTC 2025

      Hiding a category on the course management page is a very fast one-click operation.

      In the screenshot above, if you click the eye icon next to the 'Art and Media' category it will immediately be hidden, and students will immediately be unable to access any of the 4 courses in this category.

      Hypothetically, suppose a member of staff was moving a category up the list, which means they have to click the 'Up arrow' button (right next to the eye icon) lots of times. Hypothetically, suppose that in the middle of all this frenetic clicking they misclicked the 'hide' button, but did not notice and just kept on clicking the up arrow. Hypothetically, they might have hidden the entire Business School category, blocking all student use to 50+ courses until there were enough hypothetical calls to helpdesk that somebody got contacted who could actually fix it. Hypothetically this would be quite bad and people might want the hypothetical institution to make sure it doesn't happen again.

      This is a work of fiction. Names, characters, businesses, places, events, locales, and incidents are either the products of the author’s imagination or used in a fictitious manner. Any resemblance to actual persons, living or dead, or actual events is purely coincidental.

      Obviously this hypothetical situatation is possible at any university, it seems an easily mistakeable interface because up/down are extremely low-consequence actions, and are located right next to what can be a high-consequence action.

      While it would be possible to generally improve the interface on this page, as a simple short-term improvement, I suggest the following:

      • When hiding a category, if the category is not empty (contains any courses or subcategories that contain courses) then show a confirm/cancel popup.
      • Message for the popup could be something like: 'Warning: This category contains 17 courses. If you hide it, users who do not have permission to see hidden categories will be unable to access these courses.' (Hide) (Cancel)

      There is probably no need for a confirm when showing a category, or when hiding an empty category.

      I did also consider the alternative approach of moving 'Hide' to the dropdown menu where it is harder to click, but there may be some institutions that rely on hiding/showing categories frequently and it is also useful to clearly see the current hidden state, so I think the current interface has advantages and it's better to use a confirm prompt.

        1. course-management.png
          34 kB
          Sam Marshall
        2. MDL-83840_popup.png
          121 kB
          Sara Arjona (@sarjona)

            kransom Katie Ransom
            quen Sam Marshall
            Sam Marshall Sam Marshall
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            CiBoT CiBoT
            Votes:
            2 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 6 hours, 10 minutes
                6h 10m

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