Moodle
  1. Moodle
  2. MDL-35680

The user_selector can be unintuitive on slow running quieries

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3.2
    • Fix Version/s: 2.2.6, 2.3.3
    • Component/s: Administration
    • Labels:
      None
    • Testing Instructions:
      Hide

      In order to test this, I added sleep(2); in user/selector/search.php. A better test would be to use a database with a million users in it.

      1. Go to any page with a user selector, for example the check permissions page, or the assign site admins page.

      2. In the search box for a user selector, type a character, and wait about a second (so it starts searching, but the results have not been received yet), then type another character.

      Is what happens sensible?

      Watching the Firebug net panel while you do this make help you understand and test what is going on.

      Show
      In order to test this, I added sleep(2); in user/selector/search.php. A better test would be to use a database with a million users in it. 1. Go to any page with a user selector, for example the check permissions page, or the assign site admins page. 2. In the search box for a user selector, type a character, and wait about a second (so it starts searching, but the results have not been received yet), then type another character. Is what happens sensible? Watching the Firebug net panel while you do this make help you understand and test what is going on.
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:
    • Rank:
      44417

      Description

      On moodle.org, the user selector is frequently quite frustrating to use because the following happens:

      1. Type query in search box
      2. THe search starts happening
      3. As its taking a long time to search I revise the query
      4. The results from the first search appears
      5. The results have the user I want so I go to select her
      6. The screen updates with the second set of results whilst i'm doing that

      One of the most misleading parts about this is that after the first request results are returned there is no progress indicator for the second, so its not possible to tell that you are still waiting for a search to complete.
      [Discussed in devchat today]

        Activity

        Hide
        Tim Hunt added a comment -

        There you go Dan. Consider this thanks in advance for the horror that some integrator will have to undergo reviewing MDL-34657.

        Show
        Tim Hunt added a comment - There you go Dan. Consider this thanks in advance for the horror that some integrator will have to undergo reviewing MDL-34657 .
        Hide
        Dan Poltawski added a comment -

        Thanks Tim, i've integrated this now.

        Show
        Dan Poltawski added a comment - Thanks Tim, i've integrated this now.
        Hide
        Dan Poltawski added a comment -

        Tested this on the moodle.org data and its looking much better, thanks Tim!

        Show
        Dan Poltawski added a comment - Tested this on the moodle.org data and its looking much better, thanks Tim!
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Closing as fixed, many thanks for your awesome collaboration.

        Show
        Eloy Lafuente (stronk7) added a comment - Closing as fixed, many thanks for your awesome collaboration.

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: