Skip to content

Commit

Permalink
Merge branch 'm27_MDL-43818_Unable_Download_Package_Via_URL' of https…
Browse files Browse the repository at this point in the history
…://github.com/scara/moodle into MOODLE_27_STABLE
  • Loading branch information
danpoltawski committed Mar 31, 2015
2 parents 85978ff + 1d86f3c commit 2bce61f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mod/scorm/lib.php
Expand Up @@ -959,7 +959,7 @@ function scorm_pluginfile($course, $cm, $context, $filearea, $args, $forcedownlo
$lifetime = null;

if ($filearea === 'content') {
$revision = (int)array_shift($args); // prevents caching problems - ignored here
$revision = (int)array_shift($args); // Prevents caching problems - ignored here.
$relativepath = implode('/', $args);
$fullpath = "/$context->id/mod_scorm/content/0/$relativepath";
// TODO: add any other access restrictions here if needed!
Expand All @@ -968,6 +968,7 @@ function scorm_pluginfile($course, $cm, $context, $filearea, $args, $forcedownlo
if (!has_capability('moodle/course:manageactivities', $context)) {
return false;
}
$revision = (int)array_shift($args); // Prevents caching problems - ignored here.
$relativepath = implode('/', $args);
$fullpath = "/$context->id/mod_scorm/package/0/$relativepath";
$lifetime = 0; // no caching here
Expand Down

0 comments on commit 2bce61f

Please sign in to comment.