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

Alphabetise Groupings drop-down list

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 1.9.12, 2.1, 2.5.2
    • 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.

      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.

            moodle.com Moodle HQ
            carolinemoore Caroline Moore (Inactive)
            Votes:
            4 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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