mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
MDL-76317 questions: fix return and error message during import process
This commit is contained in:
parent
1ed6318d13
commit
735013c790
@ -364,7 +364,7 @@ class qformat_default {
|
|||||||
// check for errors before we continue
|
// check for errors before we continue
|
||||||
if ($this->stoponerror and ($this->importerrors>0)) {
|
if ($this->stoponerror and ($this->importerrors>0)) {
|
||||||
echo $OUTPUT->notification(get_string('importparseerror', 'question'));
|
echo $OUTPUT->notification(get_string('importparseerror', 'question'));
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// get list of valid answer grades
|
// get list of valid answer grades
|
||||||
@ -402,6 +402,7 @@ class qformat_default {
|
|||||||
|
|
||||||
// check for errors before we continue
|
// check for errors before we continue
|
||||||
if ($this->stoponerror && $gradeerrors > 0) {
|
if ($this->stoponerror && $gradeerrors > 0) {
|
||||||
|
echo $OUTPUT->notification(get_string('importparseerror', 'question'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user