The Deep Linking spec indicates that, when returning a resource link with an attached line item, the following line item properties are optional:
- label
- tag
- resourceId
- gradesReleased (not present in library yet, so can be ignored here)
See: https://www.imsglobal.org/spec/lti-dl/v2p0#lti-resource-link
Currently, the library doesn't support this, and this is causing errors to be reported on the new build.1edtech certification site, when certifying a tool for Deep Linking.
If not set, the library is sending null values, instead of omitting the properties.
Here is an example of a valid line item being constructed (as we do it using the library) and attached to a content item which is then returned:
$lineitem = LtiLineitem::new()
->setScoreMaximum($resource->get_grademax())
->setResourceId($resource->get_uuid());
$contentitem->setLineitem($lineitem);
...
$contentitems[] = $contentitem;
...
// Later, returned via form post, as usual.
$messagelaunch->getDeepLink()->getResponseJwt($contentitems)
Using this code to return the content items, results in a build.1edtech suite error (the important snippet below):
"errors": [
"'label' should be a string",
"'tag' should be a string"
],
and it reports the payload as (again, the important snippet):
"lineItem": {
"scoreMaximum": 100,
"label": null,
"resourceId": "60afb901-262a-4036-aba0-4b102265e85a",
"tag": null
},
These fields should be omitted if they aren't set. When omitted, the cert. suite will not error.
The Deep Linking spec indicates that, when returning a resource link with an attached line item, the following line item properties are optional:
See: https://www.imsglobal.org/spec/lti-dl/v2p0#lti-resource-link
Currently, the library doesn't support this, and this is causing errors to be reported on the new build.1edtech certification site, when certifying a tool for Deep Linking.
If not set, the library is sending null values, instead of omitting the properties.
Here is an example of a valid line item being constructed (as we do it using the library) and attached to a content item which is then returned:
Using this code to return the content items, results in a build.1edtech suite error (the important snippet below):
and it reports the payload as (again, the important snippet):
These fields should be omitted if they aren't set. When omitted, the cert. suite will not error.