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

Empty user selector result set from AJAX response does not present feedback

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.0.2
    • Fix Version/s: 2.3.8, 2.4.5, 2.5.1
    • Component/s: JavaScript
    • Labels:
    • Testing Instructions:
      Hide
      1. Login as Admin
      2. Go to Admin > Users > Permissions
      3. type in some random jibberish in one of the search boxes. DO NOT PRESS ENTER (wait for the ajax to load it)
      4. VERIFY: the search box should say 'No users match 'random jibberish'
      5. Enter some text which matches a user
      6. Verify the list is updated to show that
      Show
      Login as Admin Go to Admin > Users > Permissions type in some random jibberish in one of the search boxes. DO NOT PRESS ENTER (wait for the ajax to load it) VERIFY: the search box should say 'No users match 'random jibberish' Enter some text which matches a user Verify the list is updated to show that
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • Pull Master Branch:
      MDL-26925-master

      Description

      In any user selector, for example the site administrators configuration page, enter into the search field some random nonsense that is expected to return no results. The AJAX refresh of the list box presents an empty box where it should present the "No users match 'xxx'" message.

      A solution for this is to add the line indicated below in user/selector/module.js at line 252:

          ...
          } else {
              optgroup.set('label', groupname); /////ADDED
              optgroup.append(Y.Node.create('<option disabled="disabled">\u00A0</option>'));
          }
          ...
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  1 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    8/Jul/13