From: thepurpleblob Date: Wed, 18 Mar 2009 11:15:51 +0000 (+0000) Subject: MDL-18579: X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=10b4a508aed9b1308648d6dbeb0e2bd0f1964da7;p=moodle.git MDL-18579: Provide nicer message if 'Stop on error' is selected and errors are found. Merged from STABLE_19 --- diff --git a/lang/en_utf8/quiz.php b/lang/en_utf8/quiz.php index 2b1ddfff4e..53264dbc98 100644 --- a/lang/en_utf8/quiz.php +++ b/lang/en_utf8/quiz.php @@ -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'; diff --git a/question/format.php b/question/format.php index a4108c64e0..2c97915971 100644 --- a/question/format.php +++ b/question/format.php @@ -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