]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-18579:
authorthepurpleblob <thepurpleblob>
Wed, 18 Mar 2009 11:15:51 +0000 (11:15 +0000)
committerthepurpleblob <thepurpleblob>
Wed, 18 Mar 2009 11:15:51 +0000 (11:15 +0000)
Provide nicer message if 'Stop on error' is selected and errors are found.

Merged from STABLE_19

lang/en_utf8/quiz.php
question/format.php

index 2b1ddfff4e33f73303a17f5641c146a54adb1456..53264dbc987133517588c1d1f4d1b58656ae38f4 100644 (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';
index a4108c64e0c34cad454cd323807ec931a5f69954..2c9791597198f89d44ee91cc7350b542892d5d75 100644 (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