mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
Merge branch 'master_MDL-60007' of https://github.com/CengageEng/moodle
This commit is contained in:
commit
216bb33940
1 changed files with 2 additions and 1 deletions
|
@ -33,6 +33,7 @@ require_once($CFG->dirroot . '/mod/lti/locallib.php');
|
||||||
$response = new \mod_lti\local\ltiservice\response();
|
$response = new \mod_lti\local\ltiservice\response();
|
||||||
|
|
||||||
$isget = $response->get_request_method() == 'GET';
|
$isget = $response->get_request_method() == 'GET';
|
||||||
|
$isdelete = $response->get_request_method() == 'DELETE';
|
||||||
|
|
||||||
if ($isget) {
|
if ($isget) {
|
||||||
$response->set_accept(isset($_SERVER['HTTP_ACCEPT']) ? $_SERVER['HTTP_ACCEPT'] : '');
|
$response->set_accept(isset($_SERVER['HTTP_ACCEPT']) ? $_SERVER['HTTP_ACCEPT'] : '');
|
||||||
|
@ -51,7 +52,7 @@ foreach ($services as $service) {
|
||||||
foreach ($resources as $resource) {
|
foreach ($resources as $resource) {
|
||||||
if (($isget && !empty($accept) && (strpos($accept, '*/*') === false) &&
|
if (($isget && !empty($accept) && (strpos($accept, '*/*') === false) &&
|
||||||
!in_array($accept, $resource->get_formats())) ||
|
!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;
|
continue;
|
||||||
}
|
}
|
||||||
$template = $resource->get_template();
|
$template = $resource->get_template();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue