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

Admin: Improper default sorting not respecting $CFG->fullnamedisplay when browsing list of users

    Details

    • Testing Instructions:
      Hide

      1) Confirm language string in lang/en/moodle.php is firstname, lastname
      2) Confirm fullnamedisplay is set to use language (admin/settings.php?section=sitepolicies)
      3) Browse list of all users (admin/user.php)
      4) Confirm users sorted by firstname
      5) Set fullnamedisplay to use surname+firstname
      6) Browse list of users
      7) Ensure that users are sorted by lastname, firstname.

      Show
      1) Confirm language string in lang/en/moodle.php is firstname, lastname 2) Confirm fullnamedisplay is set to use language (admin/settings.php?section=sitepolicies) 3) Browse list of all users (admin/user.php) 4) Confirm users sorted by firstname 5) Set fullnamedisplay to use surname+firstname 6) Browse list of users 7) Ensure that users are sorted by lastname, firstname.
    • Workaround:
      Hide

      Click on the surname url (admin/user.php?sort=lastname&dir=DESC) to force a sort on the page

      Show
      Click on the surname url (admin/user.php?sort=lastname&dir=DESC) to force a sort on the page
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      wip-MDL-15930-master

      Description

      Per http://moodle.org/mod/forum/discuss.php?d=76855#p45328sammarshallou6, I checked and noticed that $CFG->fullnamedisplay is not properly implemented for sorting on the /admin/user.php page. Currently, it checks to see if the sorting is by name and if so defaults to firstname; however, if the fullnamedisplay begins with lastname it makes sense to expect that it should sort by lastname. To accomplish this, I moved up the code that checks for fullnamedisplay to before the execution of the query to get the users. That way the $sort variable is properly set prior to executing the query. Peace - Anthony

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  3 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    25/Dec/10