From c32f2e5c64ca08b6093bb4c077cc2879e357c80c Mon Sep 17 00:00:00 2001 From: tjhunt Date: Thu, 12 Mar 2009 06:00:55 +0000 Subject: [PATCH] gift import: MDL-18390 better way to get the question type name. --- question/format/gift/format.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/question/format/gift/format.php b/question/format/gift/format.php index 6d2b7bafcca..08a3b857fd0 100755 --- a/question/format/gift/format.php +++ b/question/format/gift/format.php @@ -528,6 +528,7 @@ function repchar( $text, $format=0 ) { } function writequestion( $question ) { + global $QTYPES; // turns question into string // question reflects database fields for general question and specific to type @@ -647,7 +648,7 @@ function writequestion( $question ) { } else { $expout .= "Question type $question->qtype is not supported\n"; - notify( get_string('nohandler','qformat_gift',get_string($question->qtype,'quiz') ) ); + notify( get_string('nohandler', 'qformat_gift', $QTYPES[$question->qtype]->local_name()) ); } } // add empty line to delimit questions