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

Allow the fields that are displayed in the User Filtering section of /admin/users.php to be configured

XMLWordPrintable

    • Any
    • MOODLE_19_STABLE, MOODLE_27_STABLE

      Current it doesn't appear possible to configure which fields are displayed as "non-advanced" on the"Browse list of users" page (/admin/users.php).

      We tend to have very little use of the default field (fullname) since we have a reasonable number of identically named students.

      Ideally we would like to be able to reconfigure the fields displayed as default to include the username (and possibly the idnumber) as the basis for searching for users.

      As far as I can see the only why to do this would be to change the users.php page to specify the fields as an array, or modify the defaults in user/filters/lib.php.

      However since we're trying to not modify the core code if possible I think it would be better if this was configurable via config.php:
      <pre>
      $CFG->user_filtering_defaults = array('realname'=>0, 'lastname'=>1, 'firstname'=>1, 'email'=>1, 'city'=>1, 'country'=>1,
      'confirmed'=>1, 'profile'=>1, 'courserole'=>1, 'systemrole'=>1,
      'firstaccess'=>1, 'lastaccess'=>1, 'lastlogin'=>1, 'timemodified'=>1, 'username'=>0, 'auth'=>1, 'mnethostid'=>1);
      </pre>

      and modify the user/filters/lib.php to:
      <pre>
      if (!empty($CFG->user_filtering_defaults))

      { $fieldnames = $CFG->user_filtering_defaults ; }

      else

      { $fieldnames = array('realname'=>0, 'lastname'=>1, 'firstname'=>1, 'email'=>1, 'city'=>1, 'country'=>1, 'confirmed'=>1, 'profile'=>1, 'courserole'=>1, 'systemrole'=>1, 'firstaccess'=>1, 'lastaccess'=>1, 'lastlogin'=>1, 'timemodified'=>1, 'username'=>0, 'auth'=>1, 'mnethostid'=>1); }

      </pre>

            Unassigned Unassigned
            mhughes2k Michael Hughes
            Votes:
            6 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

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