From: thepurpleblob Date: Mon, 16 Mar 2009 14:25:30 +0000 (+0000) Subject: MDL-18555: X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=c95defa90bc7ba72377c5ed156a806e1d49fb64c;p=moodle.git MDL-18555: Adding better handling for unsupported question types. Merged from STABLE_19 --- diff --git a/lang/en_utf8/qformat_xml.php b/lang/en_utf8/qformat_xml.php new file mode 100644 index 0000000000..062bf3ea89 --- /dev/null +++ b/lang/en_utf8/qformat_xml.php @@ -0,0 +1,4 @@ + diff --git a/question/format/xml/format.php b/question/format/xml/format.php index 8f8edad9cf..787e8af8f2 100755 --- a/question/format/xml/format.php +++ b/question/format/xml/format.php @@ -106,7 +106,7 @@ class qformat_xml extends qformat_default { } if ($istext) { if (!is_string($xml)) { - $this->error( 'Invalid xml file - string expected (use CDATA?)' ); + $this->error( get_string('invalidxml','qformat_xml') ); } $xml = trim( $xml ); } @@ -1003,7 +1003,7 @@ class qformat_xml extends qformat_default { default: // try support by optional plugin if (!$data = $this->try_exporting_using_qtypes( $question->qtype, $question )) { - print_error('unknowquestiontype', '', '', $question->qtype ); + notify( get_string( 'unsupportedexport','qformat_xml',$QTYPES[$question->qtype]->local_name() ) ); } $expout .= $data; }