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

Alphabetise Groupings drop-down list

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 1.9.12, 2.1, 2.5.2
    • None
    • Groups
    • MOODLE_19_STABLE, MOODLE_21_STABLE, MOODLE_25_STABLE
    • Hide

      Go into a course.
      Click "Groups."
      Click the "Groupings" tab.
      Create several groupings, being sure NOT to create them in alphabetical order.
      Go to the course page and create or edit a resource.
      Click the "Show Advanced" button.
      Check the "Grouping" drop-down menu; the groupings will be listed in the order in which you created them.

      Show
      Go into a course. Click "Groups." Click the "Groupings" tab. Create several groupings, being sure NOT to create them in alphabetical order. Go to the course page and create or edit a resource. Click the "Show Advanced" button. Check the "Grouping" drop-down menu; the groupings will be listed in the order in which you created them.

    Description

      When using the Groupings functionality in either 1.9 (restrict access to a resource or activity to a specific grouping) or 2.1 (apply the selected group mode to the groups in the selected grouping), the drop-down menu that lists the Groupings lists them in the order in which they were created. It would be fantastic if the groupings were displayed in alphabetical order.

      In 1.9 this is an easy fix: in course/modedit_form.php, at line 251, add the following line (surrounding lines shown for reference):

        if ($groupings = get_records('groupings', 'courseid', $COURSE->id)) {
      +     sort($groupings);   // ADD THIS LINE
            foreach ($groupings as $grouping) {
      

      This fix doesn't work in 2.1; I'll have to do some more poking through the code to see what's changed.

      Attachments

        Issue Links

          Activity

            People

              moodle.com moodle.com
              carolinemoore Caroline Moore
              Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              4 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: