MDL-40531 mod_lti: Various 1.1/1.1.1 fixes.
This commit is contained in:
committed by
Eloy Lafuente (stronk7)
parent
33ad01a291
commit
ba0f89e168
+8
-4
@@ -106,7 +106,7 @@ switch ($messagetype) {
|
||||
$grade = lti_read_grade($ltiinstance, $parsed->userid);
|
||||
|
||||
$responsexml = lti_get_response_xml(
|
||||
isset($grade) ? 'success' : 'failure',
|
||||
'success', // Empty grade is also 'success'
|
||||
'Result read',
|
||||
$parsed->messageid,
|
||||
'readResultResponse'
|
||||
@@ -159,9 +159,13 @@ switch ($messagetype) {
|
||||
global $lti_web_service_handled;
|
||||
$lti_web_service_handled = false;
|
||||
|
||||
$event = \mod_lti\event\unknown_service_api_called::create($eventdata);
|
||||
$event->set_legacy_data($eventdata);
|
||||
$event->trigger();
|
||||
try {
|
||||
$event = \mod_lti\event\unknown_service_api_called::create($eventdata);
|
||||
$event->set_legacy_data($eventdata);
|
||||
$event->trigger();
|
||||
} catch (Exception $e) {
|
||||
$lti_web_service_handled = false;
|
||||
}
|
||||
|
||||
if (!$lti_web_service_handled) {
|
||||
$responsexml = lti_get_response_xml(
|
||||
|
||||
@@ -49,6 +49,8 @@ function lti_get_response_xml($codemajor, $description, $messageref, $messagetyp
|
||||
$statusinfo->addChild('imsx_severity', 'status');
|
||||
$statusinfo->addChild('imsx_description', $description);
|
||||
$statusinfo->addChild('imsx_messageRefIdentifier', $messageref);
|
||||
$incomingtype = str_replace('Response','Request', $messagetype);
|
||||
$statusinfo->addChild('imsx_operationRefIdentifier', $incomingtype);
|
||||
|
||||
$xml->addChild('imsx_POXBody')->addChild($messagetype);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user