-
Notifications
You must be signed in to change notification settings - Fork 95
Description
Background
While testing LTI 1.3 Assignment and Grade Services (AGS) with Saltire, the results service failed even though the line item service and score publish service worked.
The issue appears to be that Open edX returns a 301 redirect for the results endpoint:
/api/lti_consumer/v1/lti/6/lti-ags/10/results
redirects to:
/api/lti_consumer/v1/lti/6/lti-ags/10/results/
Saltire appears not to handle this redirect correctly and instead tries to interpret the redirect response as JSON, which leads to the error:
The data (null) must match the type: array
This trailing slash is not present in other AGS calls, and it does not appear to be required by the spec.
Even if some tools follow the redirect, the advertised endpoint should ideally return the expected JSON response directly.
Requiring a redirect on this AGS endpoint could cause interoperability issues with tools that do not follow redirects or do not expect a non-JSON intermediate response.
Observed behavior
A GET request to the results endpoint returns:
HTTP/1.1 301 Moved Permanently
Content-Type: text/html; charset=utf-8
Location: /api/lti_consumer/v1/lti/6/lti-ags/10/results/
Expected behavior
The results endpoint should return the results collection directly, without redirecting to a trailing-slash URL.
Question/ Way forward
Is there a valid reason for this endpoint to redirect?
If not, then Open edX should return the results response directly from the URL /api/lti_consumer/v1/lti/6/lti-ags/10/results.