Background
If the comment field is blank is call to AGS score publish endpoint /api/lti_consumer/v1/lti/<lti_config_id>/lti-ags/<lineitem_id>/scores, the platform does not update the score and returns 400. Below is an example of a request and response from a tool named CourseArc. I am able to reproduce the same from the test tool SALTIRE.
Request:
POST /api/lti_consumer/v1/lti/37/lti-ags/30/scores HTTP/1.1
Host: [master.openedx.io](http://master.openedx.io/)
Authorization: Bearer ey ...
Content-Type: application/vnd.ims.lis.v1.score+json; charset=UTF-8
Content-Length: 204
User-Agent: CourseArc/1.0
Accept: */*
{"scoreGiven":1,"scoreMaximum":1,"comment":"","activityProgress":"Completed","gradingProgress":"FullyGraded","userId":"70f7ac39-f127-4d86-8686-e84e8ff7661f","timestamp":"2026-04-02T11:35:26.000000-04:00"}
Response:
HTTP/1.1 400 Bad Request
Allow: POST, OPTIONS
Alt-Svc: h3=":443"; ma=2592000
Content-Language: en
Content-Length: 44
Content-Type: application/vnd.ims.lis.v1.score+json
Server: Caddy
Set-Cookie: sessionid=1|hanv...;
Domain=[master.openedx.io](http://master.openedx.io/); expires=Thu, 16 Apr 2026 15:35:27 GMT; HttpOnly; Max-Age=1209600; Path=/; SameSite=None; Secure
Vary: Accept-Language, origin, Cookie
X-Frame-Options: SAMEORIGIN
Date: Thu, 02 Apr 2026 15:35:27 GMT
{"comment":["This field may not be blank."]}
Problem
However, the spec allows blank comment: see link.
The current value for the comment. The value must be a string. If no value exists, this attribute may be omitted, blank or have an explicit null value.
Proposed way forward
Since the spec allows blank comments, we need to allow tools to be able to publish scores:
- Without a
comment field
comment field with a blank value ""
comment field with null value
This seems like a place where this change needs to be made:
|
comment = serializers.CharField(required=False, allow_null=True) |
Background
If the comment field is blank is call to AGS score publish endpoint
/api/lti_consumer/v1/lti/<lti_config_id>/lti-ags/<lineitem_id>/scores, the platform does not update the score and returns 400. Below is an example of a request and response from a tool named CourseArc. I am able to reproduce the same from the test tool SALTIRE.Request:
Response:
Problem
However, the spec allows blank comment: see link.
Proposed way forward
Since the spec allows blank comments, we need to allow tools to be able to publish scores:
commentfieldcommentfield with a blank value""commentfield withnullvalueThis seems like a place where this change needs to be made:
xblock-lti-consumer/lti_consumer/lti_1p3/extensions/rest_framework/serializers.py
Line 128 in 525a20c