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

Option to sort My Courses list alphabetically

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.3, 2.4.1, 2.5
    • Fix Version/s: 2.4.2
    • Component/s: Navigation
    • Labels:
    • Testing Instructions:
      Hide
      1. Log in as a student with enrolments
      2. Expand the my courses branch and check things are sorted by sortorder.
      3. Change $CFG->navsortmycoursessort to 'fullname'
      4. Expand the my courses branch and check things are sorted by fullname.
      5. Change $CFG->navsortmycoursessort to 'shortname'
      6. Expand the my courses branch and check things are sorted by shortname.
      7. Change $CFG->navsortmycoursessort to 'idnumber'
      8. Expand the my courses branch and check things are sorted by idnumber.
      9. Disable JS
      10. Click "My courses"
      11. Check when you are on the my courses page that the my course branch is expanded and contains your courses.
      Show
      Log in as a student with enrolments Expand the my courses branch and check things are sorted by sortorder. Change $CFG->navsortmycoursessort to 'fullname' Expand the my courses branch and check things are sorted by fullname. Change $CFG->navsortmycoursessort to 'shortname' Expand the my courses branch and check things are sorted by shortname. Change $CFG->navsortmycoursessort to 'idnumber' Expand the my courses branch and check things are sorted by idnumber. Disable JS Click "My courses" Check when you are on the my courses page that the my course branch is expanded and contains your courses.
    • Affected Branches:
      MOODLE_22_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE
    • Pull Master Branch:
      wip-MDL-32975-m25

      Description

      In the My Courses block in 1.9.x, courses were sorted alphabetically without the ability to sort them any other way. (Line 41 of blocks/course_list/block_course_list.php)

      In the new My Courses listing in 2.2.x navigation, courses are sorted by 'sortorder' - without the ability to sort them any other way. (Line 1062 of lib/navigationlib.php).

      Why was there a change?

      Our staff are enrolled in many courses (up to 20 or 30 in some cases), spread across many categories, and 'sortorder' makes no sense to them visually. The listing actually appears quite random now.

      Would it be possible to add a flag in the navigation administration settings to 'Sort My Courses list alphabetically'?

      On our site, I will need to hack the sort fields sent to function enrol_get_my_courses from 'visible DESC, sortorder ASC' to 'visible DESC, fullname ASC', which maintains the sort that our staff have been used to.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  10 Vote for this issue
                  Watchers:
                  14 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    11/Mar/13