-
Bug
-
Resolution: Fixed
-
Major
-
3.11.6, 4.0.1
-
MOODLE_311_STABLE, MOODLE_400_STABLE
-
MOODLE_400_STABLE
-
MDL-74691-master -
-
3
-
4.1 holding pattern 2
We're trying to integrate with a client that has Moodle acting as a Tool.
While sending the 'id_token', we only send a 'lineitem' property without the 'lineitems' (plural) property, since we only support sending scores to a single resource.
When launching we are getting the following error:
Notice: Undefined index: lineitems in /var/www/*******/public_html/enrol/lti/classes/local/ltiadvantage/service/tool_launch_service.php on line 166
|
Upon inspecting this piece of code, it seems to be getting the 'lineitem' only when the plural 'lineitems' is present:
// AGS. If the lineitemsurl is missing, it means the tool has no access to the endpoint.
|
// See: http://www.imsglobal.org/spec/lti-ags/v2p0#assignment-and-grade-service-claim.
|
if ($launchdata->ags && $launchdata->ags['lineitems']) {
|
$resourcelink->add_grade_service(
|
new \moodle_url($launchdata->ags['lineitems']),
|
isset($launchdata->ags['lineitem']) ? new \moodle_url($launchdata->ags['lineitem']) : null,
|
$launchdata->ags['scope']
|
);
|
}
|
According to the spec, the plural 'lineitems' is optional.
What baffles me is that this piece of code has a comment with a link to the IMS spec, which literally has an example without the plural 'lineitems':
I assume this is a bug? This is preventing us from completing our integration with this client.
- has been marked as being related by
-
MDL-75532 LTI Advantage grade sync task still assumes lineitems URL is a required service data field
- Closed