From b6664815760119d09f2ad91720b3f5da99b8e5d1 Mon Sep 17 00:00:00 2001 From: Dongsheng Cai Date: Wed, 8 Sep 2010 14:37:22 +0000 Subject: [PATCH] "MDL-16094, fixed file server function in match type question" --- question/type/match/questiontype.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/question/type/match/questiontype.php b/question/type/match/questiontype.php index 469e11a55ff..f30ebdffcd9 100644 --- a/question/type/match/questiontype.php +++ b/question/type/match/questiontype.php @@ -813,11 +813,11 @@ class question_match_qtype extends default_questiontype { $itemid = reset($args); if ($filearea == 'subquestion') { - // always display quetion images // itemid is sub question id - if ($itemid != $question->id) { + if (!array_key_exists($itemid, $question->options->subquestions)) { return false; } + return true; } else { return parent::check_file_access($question, $state, $options, $contextid, $component, -- 2.43.0