From 575447dd68bb95346fd6b0569918c94be048be6b Mon Sep 17 00:00:00 2001 From: pichetp Date: Wed, 8 Aug 2007 02:03:43 +0000 Subject: [PATCH] Merging MDL-10680 resolved by thepurplebob from 1.9 --- question/format/webct/format.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/question/format/webct/format.php b/question/format/webct/format.php index 7eec195c243..99f8e92a3e7 100644 --- a/question/format/webct/format.php +++ b/question/format/webct/format.php @@ -348,6 +348,13 @@ class qformat_webct extends qformat_default { unset($question->answer); //not used in calculated question break; case MATCH: + // MDL-10680: + // switch subquestions and subanswers + foreach ($question->subquestions as $id=>$subquestion) { + $temp = $question->subquestions[$id]; + $question->subquestions[$id] = $question->subanswers[$id]; + $question->subanswers[$id] = $temp; + } if (count($question->answer) < 3){ // add a dummy missing question $question->name = 'Dummy question added '.$question->name ;