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

CLONE -Assign Roles page - existing users is only sorted by last name, while potential users is sorted by last name then first name

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8.1, 1.9.5, 1.9.10
    • Fix Version/s: 1.9.11
    • Component/s: Administration
    • Labels:
      None
    • Affected Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      When assigning roles, the potential uses column is sorted first by last name then by first name, while the existing users only sorts by last name.

      This is easily fixed by adding the sort option to the get_role_users like so:

      if (!$contextusers = get_role_users($roleid, $context, false, 'u.id, u.firstname, u.lastname, u.email, r.hidden','lastname ASC, firstname ASC'))

      { $contextusers = array(); }

        Attachments

        1. MDL-20607.patch
          0.8 kB
        2. mdl-20607-after.png
          mdl-20607-after.png
          152 kB
        3. mdl-20607-before.png
          mdl-20607-before.png
          152 kB

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  21/Feb/11