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

Webservice gradereport_user_get_grade_items failing when grade item name has a trailing space or "&"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 4.1.6
    • Web Services
    • None
    • MOODLE_401_STABLE

      When using gradereport_user_get_grade_items if one of the grade items has a trailing space or contains"&" the API will return an error.

      debuginfo: "usergrades => Invalid response value detected: gradeitems => Invalid response value detected: itemname => Invalid response value detected: Invalid external api response: the value is \"Assignment 1 \" of PHP type "string", the server was expecting "cleanhtml" type"

      errorcode: "invalidresponse"

      exception: "invalid_response_exception"

      message: "Invalid response value detected"

       

      E.g. if I have an assignment named "Assignment 1 " (trailing space) I will recieve an error
      if it is named "Assignment 1" It will work correctly.
      This was running correctly, though we have recently upgraded from 4.1.5 to 4.1.6 (not sure if related)
      I have also received some other similar errors from another function

            Unassigned Unassigned
            damienbell Damien Bell
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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