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

JS exception filtering course participants for keyword containing quotes

XMLWordPrintable

    • MOODLE_311_STABLE
    • MOODLE_311_STABLE
    • Hide
      1. Log in as admin
      2. Create a new user (note the quotes)
        • First name: Pat
        • Surname: The "Cat"
      3. Create a new course
      4. Enrol test user on course as student
      5. Add the following filter
        • Match: Any
        • Select: Keyword
        • Type: The "Cat"
      6. Press return on your keyboard
      7. Press Apply filters
      8. Confirm only test user is listed in participants
      9. Click on the The "Cat" selected autocomplete item to remove it
      10. Confirm selected item is removed, there are no errors/exceptions
      11. Press Apply filters
      12. Confirm all course participants are listed
      Show
      Log in as admin Create a new user (note the quotes) First name: Pat Surname: The "Cat" Create a new course Enrol test user on course as student Add the following filter Match: Any Select: Keyword Type: The "Cat" Press return on your keyboard Press Apply filters Confirm only test user is listed in participants Click on the The "Cat" selected autocomplete item to remove it Confirm selected item is removed, there are no errors/exceptions Press Apply filters Confirm all course participants are listed

      If you try to filter the course participants using keywords, and enter a search term containing quotes then the autocomplete element throws errors when you try to interact with the selected item:

      Stack trace:

      Error
      Syntax error, unrecognized expression: [data-value="Hi "There""]
      File: http://moodle.internal/master/lib/javascript.php/1637916342/lib/jquery/jquery-3.5.1.min.js
      Line: 2
      Stack trace:
       
      ln: 13606
      http://moodle.internal/master/lib/javascript.php&#
      d</se.error
       
      ln: 21617
      http://moodle.internal/master/lib/javascript.php&#
      d</se.tokenize
       
      ln: 6904
      http://moodle.internal/master/lib/javascript.php&#
      se
      

        1. Screencast 2021-11-26.gif
          Screencast 2021-11-26.gif
          288 kB
        2. Step No. 8_Passed.PNG
          Step No. 8_Passed.PNG
          56 kB
        3. Step No.10_Passed.PNG
          Step No.10_Passed.PNG
          55 kB
        4. Step No. 12_Passed.PNG
          Step No. 12_Passed.PNG
          61 kB

            pholden Paul Holden
            pholden Paul Holden
            David Carrillo David Carrillo
            Andrew Lyons Andrew Lyons
            Gladys Basiana Gladys Basiana
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 35 minutes
                1h 35m

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