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

Let the admin control if lists of courses should be pre-sorted by visibility or not

XMLWordPrintable

    • MOODLE_34_STABLE, MOODLE_37_STABLE
    • MOODLE_38_STABLE
    • MDL-61804-master
    • Hide

      Prerequisites

      1. Login as admin
      2. Create a course with fullname "Course A" and shortname "course A" and course ID Number "A" and visibility "Show"
      3. Create a course with fullname "Course B" and shortname "course B" and course ID Number "B" and visibility "Hide"
      4. Create a course with fullname "Course C" and shortname "course C" and course ID Number "C" and visibility "Show"
      5. Create a user and enrol him into all courses as teacher
      6. Go to Site administration -> Reports -> Event monitoring rules
      7. Enable event monitoring
      8. Login as teacher
      9. Go to course C
      10. Go to course B
      11. Go to course A

      Testing scenario 1. Sorting by course full name and by hidden courses after all visible courses

      1. Login as admin
      2. Go to Site administration > Appearance > Navigation
      3. Set the setting "navsortmycoursessort" to "Course full name"
      4. Enable the setting "navsortmycourseshiddenlast"
      5. save the changes
      6. Login as teacher user
      7. Switch to theme "Boost"
      8. Go to your Dashboard
      9. Verify that the course list in the nav drawer is Course A, Course C, Course B
      10. Set the ordering in the "Course overview" block to "Course name"
      11. Verify that the course list in the "Course overview" block is Course A, Course C, Course B
      12. Set the ordering in the "Course overview" block to "Last accessed"
      13. Verify that the course list in the "Course overview" block is Course A, Course C, Course B
      14. Go to your user profile page
      15. Verify that the course list on your profile page is Course A, Course C, Course B and the latter is displayed grayed out
      16. Switch to theme "Classic"
      17. Go to your Dashboard
      18. Verify that the my courses list in the navigation block is Course A, Course C, Course B and the latter is displayed grayed out
      19. Go to user menu -> Preferences -> Event monitoring
      20. Verify that the course list in the "Select a course" dropdown is Course A, Course C, Course B

      Testing scenario 2. Sorting by course short name and by hidden courses after all visible courses

      1. Login as admin
      2. Go to Site administration > Appearance > Navigation
      3. Set the setting "navsortmycoursessort" to "Course short name"
      4. Enable the setting "navsortmycourseshiddenlast"
      5. Save the changes
      6. Login as teacher user
      7. Switch to theme "Boost"
      8. Go to your Dashboard
      9. Verify that the course list in the nav drawer is Course A, Course C, Course B
      10. Set the ordering in the "Course overview" block to "Course name"
      11. Verify that the course list in the "Course overview" block is Course A, Course C, Course B
      12. Set the ordering in the "Course overview" block to "Last accessed"
      13. Verify that the course list in the "Course overview" block is Course A, Course C, Course B
      14. Go to your user profile page
      15. Verify that the course list on your profile page is Course A, Course C, Course B and the latter is displayed grayed out
      16. Switch to theme "Classic"
      17. Go to your Dashboard
      18. Verify that the my courses list in the navigation block is Course A, Course C, Course B and the latter is displayed grayed out
      19. Go to user menu -> Preferences -> Event monitoring
      20. Verify that the course list in the "Select a course" dropdown is Course A, Course C, Course B

      Testing scenario 3. Sorting by course ID number and by hidden courses after all visible courses

      1. Login as admin
      2. Go to Site administration > Appearance > Navigation
      3. Set the setting "navsortmycoursessort" to "Course ID number"
      4. Enable the setting "navsortmycourseshiddenlast"
      5. Save the changes
      6. Login as teacher user
      7. Switch to theme "Boost"
      8. Go to your Dashboard
      9. Verify that the course list in the nav drawer is Course A, Course C, Course B
      10. Set the ordering in the "Course overview" block to "Course name"
      11. Verify that the course list in the "Course overview" block is Course A, Course C, Course B
      12. Set the ordering in the "Course overview" block to "Last accessed"
      13. Verify that the course list in the "Course overview" block is Course A, Course C, Course B
      14. Go to your user profile page
      15. Verify that the course list on your profile page is Course A, Course C, Course B and the latter is displayed grayed out
      16. Switch to theme "Classic"
      17. Go to your Dashboard
      18. Verify that the my courses list in the navigation block is Course A, Course C, Course B and the latter is displayed grayed out
      19. Go to user menu -> Preferences -> Event monitoring
      20. Verify that the course list in the "Select a course" dropdown is Course A, Course C, Course B

      Testing scenario 4. Sorting by course sortorder and by hidden courses after all visible courses

      1. Login as admin
      2. Go to Site administration > Appearance > Navigation
      3. Set the setting "navsortmycoursessort" to "Sort order"
      4. Enable the setting "navsortmycourseshiddenlast"
      5. Save the changes
      6. Login as teacher user
      7. Switch to theme "Boost"
      8. Go to your Dashboard
      9. Verify that the course list in the nav drawer is Course C, Course A, Course B
      10. Set the ordering in the "Course overview" block to "Course name"
      11. Verify that the course list in the "Course overview" block is Course A, Course C, Course B
      12. Set the ordering in the "Course overview" block to "Last accessed"
      13. Verify that the course list in the "Course overview" block is Course A, Course C, Course B
      14. Go to your user profile page
      15. Verify that the course list on your profile page is Course C, Course A, Course B and the latter is displayed grayed out
      16. Switch to theme "Classic"
      17. Go to your Dashboard
      18. Verify that the my courses list in the navigation block is Course C, Course A, Course B and the latter is displayed grayed out
      19. Go to user menu -> Preferences -> Event monitoring
      20. Verify that the course list in the "Select a course" dropdown is Course C, Course A, Course B

      Testing scenario 5. Sorting by course full name and regardless of course visibility

      1. Login as admin
      2. Go to Site administration > Appearance > Navigation
      3. Set the setting "navsortmycoursessort" to "Course full name"
      4. Disable the setting "navsortmycourseshiddenlast"
      5. Save the changes
      6. Login as teacher user
      7. Switch to theme "Boost"
      8. Go to your Dashboard
      9. Verify that the course list in the nav drawer is Course A, Course B, Course C
      10. Set the ordering in the "Course overview" block to "Course name"
      11. Verify that the course list in the "Course overview" block is Course A, Course B, Course C
      12. Set the ordering in the "Course overview" block to "Last accessed"
      13. Verify that the course list in the "Course overview" block is Course A, Course B, Course C
      14. Go to your user profile page
      15. Verify that the course list on your profile page is Course A, Course B, Course C and Course B is displayed grayed out
      16. Switch to theme "Classic"
      17. Go to your Dashboard
      18. Verify that the my courses list in the navigation block is Course A, Course B, Course C and Course B is displayed grayed out
      19. Go to user menu -> Preferences -> Event monitoring
      20. Verify that the course list in the "Select a course" dropdown is Course A, Course B, Course C

      Testing scenario 6. Sorting by course short name and regardless of course visibility

      1. Login as admin
      2. Go to Site administration > Appearance > Navigation
      3. Set the setting "navsortmycoursessort" to "Course short name"
      4. Disable the setting "navsortmycourseshiddenlast"
      5. Save the changes
      6. Login as teacher user
      7. Switch to theme "Boost"
      8. Go to your Dashboard
      9. Verify that the course list in the nav drawer is Course A, Course B, Course C
      10. Set the ordering in the "Course overview" block to "Course name"
      11. Verify that the course list in the "Course overview" block is Course A, Course B, Course C
      12. Set the ordering in the "Course overview" block to "Last accessed"
      13. Verify that the course list in the "Course overview" block is Course A, Course B, Course C
      14. Go to your user profile page
      15. Verify that the course list on your profile page is Course A, Course B, Course C and Course B is displayed grayed out
      16. Switch to theme "Classic"
      17. Go to your Dashboard
      18. Verify that the my courses list in the navigation block is Course A, Course B, Course C and Course B is displayed grayed out
      19. Go to user menu -> Preferences -> Event monitoring
      20. Verify that the course list in the "Select a course" dropdown is Course A, Course B, Course C

      Testing scenario 7. Sorting by course ID number and regardless of course visibility

      1. Login as admin
      2. Go to Site administration > Appearance > Navigation
      3. Set the setting "navsortmycoursessort" to "Course ID number"
      4. Disable the setting "navsortmycourseshiddenlast"
      5. Save the changes
      6. Login as teacher user
      7. Switch to theme "Boost"
      8. Go to your Dashboard
      9. Verify that the course list in the nav drawer is Course A, Course B, Course C
      10. Set the ordering in the "Course overview" block to "Course name"
      11. Verify that the course list in the "Course overview" block is Course A, Course B, Course C
      12. Set the ordering in the "Course overview" block to "Last accessed"
      13. Verify that the course list in the "Course overview" block is Course A, Course B, Course C
      14. Go to your user profile page
      15. Verify that the course list on your profile page is Course A, Course B, Course C and Course B is displayed grayed out
      16. Switch to theme "Classic"
      17. Go to your Dashboard
      18. Verify that the my courses list in the navigation block is Course A, Course B, Course C and Course B is displayed grayed out
      19. Go to user menu -> Preferences -> Event monitoring
      20. Verify that the course list in the "Select a course" dropdown is Course A, Course B, Course C

      Testing scenario 8. Sorting by course Sort order and regardless of course visibility

      1. Login as admin
      2. Go to Site administration > Appearance > Navigation
      3. Set the setting "navsortmycoursessort" to "Sort order"
      4. Disable the setting "navsortmycourseshiddenlast"
      5. Save the changes
      6. Login as teacher user
      7. Switch to theme "Boost"
      8. Go to your Dashboard
      9. Verify that the course list in the nav drawer is Course C, Course B, Course A
      10. Set the ordering in the "Course overview" block to "Course name"
      11. Verify that the course list in the "Course overview" block is Course A, Course B, Course C
      12. Set the ordering in the "Course overview" block to "Last accessed"
      13. Verify that the course list in the "Course overview" block is Course A, Course B, Course C
      14. Go to your user profile page
      15. Verify that the course list on your profile page is Course C, Course B, Course A and Course B is displayed grayed out
      16. Switch to theme "Classic"
      17. Go to your Dashboard
      18. Verify that the my courses list in the navigation block is Course C, Course B, Course A and Course B is displayed grayed out
      19. Go to user menu -> Preferences -> Event monitoring
      20. Verify that the course list in the "Select a course" dropdown is Course C, Course B, Course A

       

      Show
      Prerequisites Login as admin Create a course with fullname "Course A" and shortname "course A" and course ID Number "A" and visibility "Show" Create a course with fullname "Course B" and shortname "course B" and course ID Number "B" and visibility "Hide" Create a course with fullname "Course C" and shortname "course C" and course ID Number "C" and visibility "Show" Create a user and enrol him into all courses as teacher Go to Site administration -> Reports -> Event monitoring rules Enable event monitoring Login as teacher Go to course C Go to course B Go to course A Testing scenario 1. Sorting by course full name and by hidden courses after all visible courses Login as admin Go to Site administration > Appearance > Navigation Set the setting "navsortmycoursessort" to "Course full name" Enable the setting "navsortmycourseshiddenlast" save the changes Login as teacher user Switch to theme "Boost" Go to your Dashboard Verify that the course list in the nav drawer is Course A, Course C, Course B Set the ordering in the "Course overview" block to "Course name" Verify that the course list in the "Course overview" block is Course A, Course C, Course B Set the ordering in the "Course overview" block to "Last accessed" Verify that the course list in the "Course overview" block is Course A, Course C, Course B Go to your user profile page Verify that the course list on your profile page is Course A, Course C, Course B and the latter is displayed grayed out Switch to theme "Classic" Go to your Dashboard Verify that the my courses list in the navigation block is Course A, Course C, Course B and the latter is displayed grayed out Go to user menu -> Preferences -> Event monitoring Verify that the course list in the "Select a course" dropdown is Course A, Course C, Course B Testing scenario 2. Sorting by course short name and by hidden courses after all visible courses Login as admin Go to Site administration > Appearance > Navigation Set the setting "navsortmycoursessort" to "Course short name" Enable the setting "navsortmycourseshiddenlast" Save the changes Login as teacher user Switch to theme "Boost" Go to your Dashboard Verify that the course list in the nav drawer is Course A, Course C, Course B Set the ordering in the "Course overview" block to "Course name" Verify that the course list in the "Course overview" block is Course A, Course C, Course B Set the ordering in the "Course overview" block to "Last accessed" Verify that the course list in the "Course overview" block is Course A, Course C, Course B Go to your user profile page Verify that the course list on your profile page is Course A, Course C, Course B and the latter is displayed grayed out Switch to theme "Classic" Go to your Dashboard Verify that the my courses list in the navigation block is Course A, Course C, Course B and the latter is displayed grayed out Go to user menu -> Preferences -> Event monitoring Verify that the course list in the "Select a course" dropdown is Course A, Course C, Course B Testing scenario 3. Sorting by course ID number and by hidden courses after all visible courses Login as admin Go to Site administration > Appearance > Navigation Set the setting "navsortmycoursessort" to "Course ID number" Enable the setting "navsortmycourseshiddenlast" Save the changes Login as teacher user Switch to theme "Boost" Go to your Dashboard Verify that the course list in the nav drawer is Course A, Course C, Course B Set the ordering in the "Course overview" block to "Course name" Verify that the course list in the "Course overview" block is Course A, Course C, Course B Set the ordering in the "Course overview" block to "Last accessed" Verify that the course list in the "Course overview" block is Course A, Course C, Course B Go to your user profile page Verify that the course list on your profile page is Course A, Course C, Course B and the latter is displayed grayed out Switch to theme "Classic" Go to your Dashboard Verify that the my courses list in the navigation block is Course A, Course C, Course B and the latter is displayed grayed out Go to user menu -> Preferences -> Event monitoring Verify that the course list in the "Select a course" dropdown is Course A, Course C, Course B Testing scenario 4. Sorting by course sortorder and by hidden courses after all visible courses Login as admin Go to Site administration > Appearance > Navigation Set the setting "navsortmycoursessort" to "Sort order" Enable the setting "navsortmycourseshiddenlast" Save the changes Login as teacher user Switch to theme "Boost" Go to your Dashboard Verify that the course list in the nav drawer is Course C, Course A, Course B Set the ordering in the "Course overview" block to "Course name" Verify that the course list in the "Course overview" block is Course A, Course C, Course B Set the ordering in the "Course overview" block to "Last accessed" Verify that the course list in the "Course overview" block is Course A, Course C, Course B Go to your user profile page Verify that the course list on your profile page is Course C, Course A, Course B and the latter is displayed grayed out Switch to theme "Classic" Go to your Dashboard Verify that the my courses list in the navigation block is Course C, Course A, Course B and the latter is displayed grayed out Go to user menu -> Preferences -> Event monitoring Verify that the course list in the "Select a course" dropdown is Course C, Course A, Course B Testing scenario 5. Sorting by course full name and regardless of course visibility Login as admin Go to Site administration > Appearance > Navigation Set the setting "navsortmycoursessort" to "Course full name" Disable the setting "navsortmycourseshiddenlast" Save the changes Login as teacher user Switch to theme "Boost" Go to your Dashboard Verify that the course list in the nav drawer is Course A, Course B, Course C Set the ordering in the "Course overview" block to "Course name" Verify that the course list in the "Course overview" block is Course A, Course B, Course C Set the ordering in the "Course overview" block to "Last accessed" Verify that the course list in the "Course overview" block is Course A, Course B, Course C Go to your user profile page Verify that the course list on your profile page is Course A, Course B, Course C and Course B is displayed grayed out Switch to theme "Classic" Go to your Dashboard Verify that the my courses list in the navigation block is Course A, Course B, Course C and Course B is displayed grayed out Go to user menu -> Preferences -> Event monitoring Verify that the course list in the "Select a course" dropdown is Course A, Course B, Course C Testing scenario 6. Sorting by course short name and regardless of course visibility Login as admin Go to Site administration > Appearance > Navigation Set the setting "navsortmycoursessort" to "Course short name" Disable the setting "navsortmycourseshiddenlast" Save the changes Login as teacher user Switch to theme "Boost" Go to your Dashboard Verify that the course list in the nav drawer is Course A, Course B, Course C Set the ordering in the "Course overview" block to "Course name" Verify that the course list in the "Course overview" block is Course A, Course B, Course C Set the ordering in the "Course overview" block to "Last accessed" Verify that the course list in the "Course overview" block is Course A, Course B, Course C Go to your user profile page Verify that the course list on your profile page is Course A, Course B, Course C and Course B is displayed grayed out Switch to theme "Classic" Go to your Dashboard Verify that the my courses list in the navigation block is Course A, Course B, Course C and Course B is displayed grayed out Go to user menu -> Preferences -> Event monitoring Verify that the course list in the "Select a course" dropdown is Course A, Course B, Course C Testing scenario 7. Sorting by course ID number and regardless of course visibility Login as admin Go to Site administration > Appearance > Navigation Set the setting "navsortmycoursessort" to "Course ID number" Disable the setting "navsortmycourseshiddenlast" Save the changes Login as teacher user Switch to theme "Boost" Go to your Dashboard Verify that the course list in the nav drawer is Course A, Course B, Course C Set the ordering in the "Course overview" block to "Course name" Verify that the course list in the "Course overview" block is Course A, Course B, Course C Set the ordering in the "Course overview" block to "Last accessed" Verify that the course list in the "Course overview" block is Course A, Course B, Course C Go to your user profile page Verify that the course list on your profile page is Course A, Course B, Course C and Course B is displayed grayed out Switch to theme "Classic" Go to your Dashboard Verify that the my courses list in the navigation block is Course A, Course B, Course C and Course B is displayed grayed out Go to user menu -> Preferences -> Event monitoring Verify that the course list in the "Select a course" dropdown is Course A, Course B, Course C Testing scenario 8. Sorting by course Sort order and regardless of course visibility Login as admin Go to Site administration > Appearance > Navigation Set the setting "navsortmycoursessort" to "Sort order" Disable the setting "navsortmycourseshiddenlast" Save the changes Login as teacher user Switch to theme "Boost" Go to your Dashboard Verify that the course list in the nav drawer is Course C, Course B, Course A Set the ordering in the "Course overview" block to "Course name" Verify that the course list in the "Course overview" block is Course A, Course B, Course C Set the ordering in the "Course overview" block to "Last accessed" Verify that the course list in the "Course overview" block is Course A, Course B, Course C Go to your user profile page Verify that the course list on your profile page is Course C, Course B, Course A and Course B is displayed grayed out Switch to theme "Classic" Go to your Dashboard Verify that the my courses list in the navigation block is Course C, Course B, Course A and Course B is displayed grayed out Go to user menu -> Preferences -> Event monitoring Verify that the course list in the "Select a course" dropdown is Course C, Course B, Course A  

      Historically, Moodle has a pre-sorting for lists of courses (in the nav drawer and other locations) which puts invisible courses at the end of the course list. This pre-sorting is processed before the real sorting based on $CFG->navsortmycoursessort is done.

      You can see this at many places in the codebase if you search for

      visible DESC
      

      For most Moodle use cases, this pre-sorting makes sense. Hidden courses are courses which are still to be prepared or which have somehow reached their end of life. However, there are also valid use cases where this assumption is not right: For example, if you have an hidden course which is hidden by purpose to make sure that it is not found in the Moodle course search and is only accessible by enrolled teachers.

      Additionally, if $CFG->navsortmycoursessort is configured to sort the course lists by course name, users might be confused to see their course list divided into two logical parts: One part for visible courses, one part for hidden courses, both sorted alphabetically.

      I propose to add a new admin setting besided $CFG->navsortmycoursessort which lets admins control if lists of courses should be pre-sorted by visibility or not.

        1. Screenshot_8.png
          Screenshot_8.png
          111 kB
        2. Screenshot_7.png
          Screenshot_7.png
          117 kB
        3. Screenshot_6.png
          Screenshot_6.png
          120 kB
        4. Screenshot_5.png
          Screenshot_5.png
          114 kB
        5. Screenshot_4.png
          Screenshot_4.png
          122 kB
        6. Screenshot_3.png
          Screenshot_3.png
          123 kB
        7. Screenshot_2.png
          Screenshot_2.png
          118 kB
        8. Screenshot_1.png
          Screenshot_1.png
          113 kB
        9. newsettinginvisiblecourses.png
          newsettinginvisiblecourses.png
          52 kB

            abias Alexander Bias
            abias Alexander Bias
            Luca Bösch Luca Bösch
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Janelle Barcega Janelle Barcega
            Votes:
            3 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved:

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

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