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

Option to sort My Courses list alphabetically

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.2.3, 2.4.1, 2.5
    • 2.4.2
    • Navigation
    • MOODLE_22_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • MOODLE_24_STABLE
    • wip-MDL-32975-m25
    • 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.

    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.

      Attachments

        Issue Links

          Activity

            People

              samhemelryk Sam Hemelryk
              mcwoods Michael Woods
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Ankit Agarwal Ankit Agarwal
              David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              10 Vote for this issue
              Watchers:
              15 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                11/Mar/13