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

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

XMLWordPrintable

    • MOODLE_19_STABLE, MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
    • wip-MDL-15930-master
    • 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
    • Easy
    • 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.

      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

            abgreeve Adrian Greeve
            aborrow Anthony Borrow
            Frédéric Massart Frédéric Massart
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Jason Fowler Jason Fowler
            Votes:
            3 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.