mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-32147 SCORM improve performance of 404s for files inside SCORM packages.
This commit is contained in:
parent
832626da76
commit
ef1889484b
1 changed files with 4 additions and 0 deletions
|
@ -921,6 +921,10 @@ function scorm_pluginfile($course, $cm, $context, $filearea, $args, $forcedownlo
|
|||
|
||||
$fs = get_file_storage();
|
||||
if (!$file = $fs->get_file_by_hash(sha1($fullpath)) or $file->is_directory()) {
|
||||
if ($filearea === 'content') { //return file not found straight away to improve performance.
|
||||
header('HTTP/1.0 404 not found');
|
||||
die;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue