Merging MDL-10680 resolved by thepurplebob from 1.9

This commit is contained in:
pichetp
2007-08-08 02:03:43 +00:00
parent 071b220cbb
commit 575447dd68
+7
View File
@@ -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 ;