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

The number of search results is not always correct in the role assignment view

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 1.8.3, 1.9
    • 1.9
    • Roles / Access
    • None
    • Any
    • MOODLE_19_STABLE
    • MOODLE_18_STABLE, MOODLE_19_STABLE

      If you have two "Samulis" in the system, and one in the selected role, then searching for "Samuli" will show "Search results (2)" but only one "Samuli" on the list.

      The problem code is in /admin/roles/assign.php and assign.html. It counts the number of search hits before subtracting the $contextusers that are already in the context.

      The problem is more in-your-face if all of the search results are alredy in the context. You get a non-zero amount of search results, but an empty list nevertheless.

      One possible solution: use the get_users() instead, and construct the exceptions-list for the function call, based on $contextusers.

            lazyfish Yu Zhang
            samulik Samuli Karevaara
            Nobody Nobody (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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