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

Details

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

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              lazyfish Yu Zhang
              samulik Samuli Karevaara
              Nobody Nobody
              David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                11/Oct/07