Merge branch 'm27_MDL-43818_Unable_Download_Package_Via_URL' of https://github.com/scara/moodle into MOODLE_27_STABLE

This commit is contained in:
Dan Poltawski
2015-03-31 09:27:56 +01:00
+2 -1
View File
@@ -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!
@@ -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