From c05878500b12cf6da35beff177c98320ac726a5e Mon Sep 17 00:00:00 2001 From: thepurpleblob Date: Tue, 3 Mar 2009 15:36:17 +0000 Subject: [PATCH] MDL-18390: Correctly report unhandled question types and get string from language pack. --- lang/en_utf8/qformat_gift.php | 3 +++ question/format/gift/format.php | 9 ++------- 2 files changed, 5 insertions(+), 7 deletions(-) create mode 100644 lang/en_utf8/qformat_gift.php 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 -- 2.39.5