Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-32147 SCORM improve performance of 404s for files inside SCORM pa…

…ckages.
  • Loading branch information...
commit 5d2930d9ddee24724456592f960b19eed5da5899 1 parent 3c4111e
@danmarsden danmarsden authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 mod/scorm/lib.php
View
4 mod/scorm/lib.php
@@ -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;
}
Please sign in to comment.
Something went wrong with that request. Please try again.