mirror of
https://github.com/moodle/moodle.git
synced 2025-02-13 12:34:28 +01:00
MDL-32147 SCORM improve performance of 404s for files inside SCORM packages.
This commit is contained in:
parent
a2b30aa852
commit
6ceef54c6e
@ -923,6 +923,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…
x
Reference in New Issue
Block a user