From: gbateson Date: Tue, 1 Sep 2009 01:25:23 +0000 (+0000) Subject: MDL-20184 use $this->error() to print error message if no questions found importing... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=50476da5c36ce46fe759de809c2ee0c0643df5d9;p=moodle.git MDL-20184 use $this->error() to print error message if no questions found importing from a Hot Potatoes XML file into Moodle's question bank / Quiz module --- diff --git a/question/format/hotpot/format.php b/question/format/hotpot/format.php index 8464ccfb5b..87ee56444c 100644 --- a/question/format/hotpot/format.php +++ b/question/format/hotpot/format.php @@ -106,6 +106,9 @@ class qformat_hotpot extends qformat_default { if (count($questions)) { return $questions; } else { + if (method_exists($this, 'error')) { // Moodle >= 1.8 + $this->error(get_string('giftnovalidquestion', 'quiz')); + } return false; } }