MDL-18579:

Provide nicer message if 'Stop on error' is selected and errors are found.

Merged from STABLE_19
This commit is contained in:
thepurpleblob 2009-03-18 11:15:51 +00:00
parent 2d10b78980
commit 10b4a508ae
2 changed files with 3 additions and 1 deletions

View File

@ -368,6 +368,7 @@ $string['importingquestions'] = 'Importing $a questions from file';
$string['importmax10error'] = 'There is an error in the question. You may not have more than ten answers';
$string['importmaxerror'] = 'There is an error in the question. There are too many answers.';
$string['importminerror'] = 'There is an error in the question. There are not enough answers for this question type';
$string['importparseerror' ] = 'Error(s) found parsing the import file. No questions have been imported. To import any good questions try again setting \'Stop on error\' to \'No\'';
$string['importquestions'] = 'Import questions from file';
$string['incorrect'] = 'Incorrect';
$string['indivresp'] = 'Responses of Individuals to Each Item';

View File

@ -239,7 +239,8 @@ class qformat_default {
// check for errors before we continue
if ($this->stoponerror and ($this->importerrors>0)) {
return false;
notify( get_string('importparseerror','quiz') );
return true;
}
// get list of valid answer grades