MDL-32147 SCORM improve performance of 404s for files inside SCORM packages.

This commit is contained in:
Dan Marsden
2012-03-23 09:45:09 +13:00
parent 3c4111ee68
commit 5d2930d9dd
+4
View File
@@ -909,6 +909,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;
}