]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-20184 use $this->error() to print error message if no questions found importing...
authorgbateson <gbateson>
Tue, 1 Sep 2009 01:25:23 +0000 (01:25 +0000)
committergbateson <gbateson>
Tue, 1 Sep 2009 01:25:23 +0000 (01:25 +0000)
question/format/hotpot/format.php

index 8464ccfb5b6cf6682488602b64c990d68b9cda10..87ee56444c7f89659ba7c48a09960e5339338455 100644 (file)
@@ -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;
         }
     }