From 981f50588da6829fa7e625486fc049327b6b8ad7 Mon Sep 17 00:00:00 2001 From: Jamie Pratt Date: Thu, 21 Jun 2012 12:45:11 +0700 Subject: [PATCH] MDL-47494 gapselect: NOBUG fixes for fileaccess through lib.php added missing lib.php files and fixed comments --- question/type/gapselect/lib.php | 38 +++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 question/type/gapselect/lib.php diff --git a/question/type/gapselect/lib.php b/question/type/gapselect/lib.php new file mode 100644 index 00000000000..5dc4cb4906a --- /dev/null +++ b/question/type/gapselect/lib.php @@ -0,0 +1,38 @@ +. + +/** + * Serve question type files + * + * @package qtype + * @subpackage gapselect + * @copyright 2012 The Open University + * @author Jamie Pratt + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + + +defined('MOODLE_INTERNAL') || die(); + +/** + * Checks file access for gapselect questions. + */ +function qtype_gapselect_pluginfile($course, $cm, $context, $filearea, $args, $forcedownload) { + global $CFG; + require_once($CFG->libdir . '/questionlib.php'); + question_pluginfile($course, $context, 'qtype_ddmarker', $filearea, $args, $forcedownload); +} +