From e45d37bbf3fad529c4c715e89ac13112092e2717 Mon Sep 17 00:00:00 2001 From: Tim Hunt Date: Wed, 2 Feb 2011 19:03:38 +0000 Subject: [PATCH] MDL-47494 gapselect: Finish making ddwtos work, mostly. Also various other JS fixes. This JavaScript really needs to be rewritten to use YUI3. --- question/type/gapselect/questionbase.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/question/type/gapselect/questionbase.php b/question/type/gapselect/questionbase.php index 52857eeb45a..eb4da07d999 100755 --- a/question/type/gapselect/questionbase.php +++ b/question/type/gapselect/questionbase.php @@ -283,4 +283,17 @@ abstract class qtype_gapselect_question_base extends question_graded_automatical } return $parts; } + + public function check_file_access($qa, $options, $component, $filearea, $args, $forcedownload) { + if ($component == 'question' && in_array($filearea, + array('correctfeedback', 'partiallycorrectfeedback', 'incorrectfeedback'))) { + return $this->check_combined_feedback_file_access($qa, $options, $filearea); + + } else if ($component == 'question' && $filearea == 'hint') { + return $this->check_hint_file_access($qa, $options, $args); + + } else { + return parent::check_file_access($qa, $options, $component, $filearea, $args, $forcedownload); + } + } }