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

Give back the default sort behaviour (lastname) in the participant table

XMLWordPrintable

    • MOODLE_34_STABLE, MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE
    • MOODLE_37_STABLE, MOODLE_38_STABLE
    • Hide
      1. Login as admin
      2. Create the following users
        Fred Buster
        Betty Adams
        Alex Colins
      3. Enrol those users to a course
      4. Go to the participants page of that course
      5. Verify that the users are sorted by last name:
        Betty Adams
        Fred Buster
        Alex Colins
      Show
      Login as admin Create the following users Fred Buster Betty Adams Alex Colins Enrol those users to a course Go to the participants page of that course Verify that the users are sorted by last name: Betty Adams Fred Buster Alex Colins

      In Moodle 3.3, the participants/enrolled users table was default sorted by last name. In 3.4 and 3.5, it is default sorted by first name. This is a change in behavior, and due to the fact that people in Moodle (and in general) are usually sorted by last name, I think it can be considered a change in a negative direction.

      The simplest fix is to replace the hard coded 

      $this->sortable(true, 'firstname');
      

      with

      $this->sortable(true, 'lastname');
      

      on line 214 of user/classes/participants_table.php

      Related to (but distinct from) MDL-58745

            azito Andrew Zito
            azito Andrew Zito
            Kathrin Osswald Kathrin Osswald
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Janelle Barcega Janelle Barcega
            Votes:
            3 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 41 minutes
                41m

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