Navigation Menu

Skip to content

Commit

Permalink
Merge branch 'MOODLE_32_STABLE_MDL-60007' of https://github.com/Cenga…
Browse files Browse the repository at this point in the history
…geEng/moodle into MOODLE_32_STABLE
  • Loading branch information
snake committed Nov 2, 2017
2 parents 2ba8535 + 44b817c commit 2d56bc1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mod/lti/services.php
Expand Up @@ -33,6 +33,7 @@
$response = new \mod_lti\local\ltiservice\response();

$isget = $response->get_request_method() == 'GET';
$isdelete = $response->get_request_method() == 'DELETE';

if ($isget) {
$response->set_accept(isset($_SERVER['HTTP_ACCEPT']) ? $_SERVER['HTTP_ACCEPT'] : '');
Expand All @@ -51,7 +52,7 @@
foreach ($resources as $resource) {
if (($isget && !empty($accept) && (strpos($accept, '*/*') === false) &&
!in_array($accept, $resource->get_formats())) ||
(!$isget && !in_array($response->get_content_type(), $resource->get_formats()))) {
((!$isget && !$isdelete) && !in_array($response->get_content_type(), $resource->get_formats()))) {
continue;
}
$template = $resource->get_template();
Expand Down

0 comments on commit 2d56bc1

Please sign in to comment.