Details
-
Improvement
-
Resolution: Fixed
-
Minor
-
3.4, 3.7
-
MOODLE_34_STABLE, MOODLE_37_STABLE
-
MOODLE_38_STABLE
-
MDL-61804-master -
Hide
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
ShowPrerequisites 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
Description
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.
Attachments
- Screenshot_1.png
- 113 kB
- Screenshot_2.png
- 118 kB
- Screenshot_3.png
- 123 kB
- Screenshot_4.png
- 122 kB
- Screenshot_5.png
- 114 kB
- Screenshot_6.png
- 120 kB
- Screenshot_7.png
- 117 kB
- Screenshot_8.png
- 111 kB
Issue Links
- is duplicated by
-
MDL-66686 Sort order of "My courses" should not depend on visibility of the courses I teach
-
- Closed
-