From 735013c790634f3870b5f1259bd0390d9cc30ed9 Mon Sep 17 00:00:00 2001 From: Julien Boulen Date: Wed, 27 Mar 2024 13:13:21 +0100 Subject: [PATCH] MDL-76317 questions: fix return and error message during import process --- question/format.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/question/format.php b/question/format.php index c8fc1fd5b21..0be6f752c71 100644 --- a/question/format.php +++ b/question/format.php @@ -364,7 +364,7 @@ class qformat_default { // check for errors before we continue if ($this->stoponerror and ($this->importerrors>0)) { echo $OUTPUT->notification(get_string('importparseerror', 'question')); - return true; + return false; } // get list of valid answer grades @@ -402,6 +402,7 @@ class qformat_default { // check for errors before we continue if ($this->stoponerror && $gradeerrors > 0) { + echo $OUTPUT->notification(get_string('importparseerror', 'question')); return false; }