MDL-76317 questions: fix return and error message during import process

This commit is contained in:
Julien Boulen 2024-03-27 13:13:21 +01:00
parent 1ed6318d13
commit 735013c790

View File

@ -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;
}