mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 08:55:15 +02:00
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
This commit is contained in:
parent
e564571835
commit
50476da5c3
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user