Details
-
Type:
Bug
-
Status: Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 3.7.4, 3.8
-
Fix Version/s: None
-
Component/s: External Tool (IMS-LTI)
-
Labels:
-
Affected Branches:MOODLE_37_STABLE, MOODLE_38_STABLE
Description
If you use Site administration / Plugins / Activity modules / External tool / Manage tools to add a new External Tool adding the Tool URL in the input box then you get a new External Tool set to LTI 2.0.
In this case, the enrol task to synchronization grades fails and returns the following errors:
Error 1: When there are no grades to synchronize.
Skipping - Invalid grade for the user '8' in the tool '3' for the course '2'. |
Error 2: When there are grades to synchronize.
Failed - The grade '0.99' for the user '9' in the tool '3' for the course '2' failed to send. |
Digging in the error we can see the following trace:
<?xml version="1.0" encoding="UTF-8"?> |
<imsx_POXEnvelopeResponse xmlns="http://www.imsglobal.org/services/ltiv1p1/xsd/imsoms_v1p0"><imsx_POXHeader><imsx_POXResponseHeaderInfo><imsx_version>V1.0</imsx_version><imsx_messageIdentifier>2138677349</imsx_messageIdentifier><imsx_statusInfo><imsx_codeMajor>failure</imsx_codeMajor><imsx_severity>status</imsx_severity><imsx_description>Message signature not valid |
* line 72 of /mod/lti/service.php: Exception thrown |
</imsx_description><imsx_messageRefIdentifier/><imsx_operationRefIdentifier>unknownRequest</imsx_operationRefIdentifier></imsx_statusInfo></imsx_POXResponseHeaderInfo></imsx_POXHeader><imsx_POXBody><unknownResponse/></imsx_POXBody></imsx_POXEnvelopeResponse>
|
|
|
Failed - The grade '0.99' for the user '9' in the tool '3' for the course '2' failed to send. |
Then if we continue digging deeper, we could see how lti_verify_message returns false even all in the DataBase seems to be fine.
Also, digging more we could see in check_signature is returning the “Invalid signature”. And we could see how in mod/lti/OAuthBody.php the request doesn't get the oauth_token to validate the signature.