From 98edf7b6476e97a80d74fa48d5c05513386e0eb1 Mon Sep 17 00:00:00 2001 From: skodak Date: Fri, 3 Jul 2009 13:39:39 +0000 Subject: [PATCH] MDL-14589 improved _pluginfile function - added forcedownload param and fixed docs --- mod/glossary/lib.php | 12 ++++++++---- mod/scorm/lib.php | 6 +++--- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/mod/glossary/lib.php b/mod/glossary/lib.php index e626c37dc3..e369ec6f9e 100644 --- a/mod/glossary/lib.php +++ b/mod/glossary/lib.php @@ -1305,11 +1305,15 @@ function glossary_get_file_areas($course, $cm, $context) { /** * Serves the glossary attachments. Implements needed access control ;-) * - * @global object - * @global object - * @return bool + * @param object $course + * @param object $cminfo + * @param object $context + * @param string $filearea + * @param array $args + * @param bool $forcedownload + * @return bool falso if file not found, does not return if found - just send the file */ -function glossary_pluginfile($course, $cminfo, $context, $filearea, $args) { +function glossary_pluginfile($course, $cminfo, $context, $filearea, $args, $forcedownload) { global $CFG, $DB; if (!$cminfo->uservisible) { diff --git a/mod/scorm/lib.php b/mod/scorm/lib.php index f1e1792d44..e4c86f9650 100755 --- a/mod/scorm/lib.php +++ b/mod/scorm/lib.php @@ -847,15 +847,15 @@ function scorm_get_file_info($browser, $areas, $course, $cm, $context, $filearea /** * Serves scorm content, introduction images and packages. Implements needed access control ;-) * - * @global stdClass * @param object $course * @param object $cminfo * @param object $context * @param string $filearea * @param array $args - * @return bool + * @param bool $forcedownload + * @return bool falso if file not found, does not return if found - justsend the file */ -function scorm_pluginfile($course, $cminfo, $context, $filearea, $args) { +function scorm_pluginfile($course, $cminfo, $context, $filearea, $args, $forcedownload) { global $CFG; if (!$cminfo->uservisible) { -- 2.39.5