From: thepurpleblob Date: Tue, 3 Mar 2009 15:36:17 +0000 (+0000) Subject: MDL-18390: X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=c05878500b12cf6da35beff177c98320ac726a5e;p=moodle.git MDL-18390: Correctly report unhandled question types and get string from language pack. --- diff --git a/lang/en_utf8/qformat_gift.php b/lang/en_utf8/qformat_gift.php new file mode 100644 index 0000000000..45a379e005 --- /dev/null +++ b/lang/en_utf8/qformat_gift.php @@ -0,0 +1,3 @@ + diff --git a/question/format/gift/format.php b/question/format/gift/format.php index 43c8d7d544..c7d13b9de4 100755 --- a/question/format/gift/format.php +++ b/question/format/gift/format.php @@ -640,19 +640,14 @@ function writequestion( $question ) { } $expout .= "}\n"; break; - case DESCRIPTION: - $expout .= "// DESCRIPTION type is not supported\n"; - break; - case MULTIANSWER: - $expout .= "// CLOZE type is not supported\n"; - break; default: // check for plugins if ($out = $this->try_exporting_using_qtypes( $question->qtype, $question )) { $expout .= $out; } else { - notify("No handler for qtype '$question->qtype' for GIFT export" ); + $expout .= "Question type $question->qtype is not supported\n"; + notify( get_string('nohandler','qformat_gift',$question->qtype ) ); } } // add empty line to delimit questions