]> git.mjollnir.org Git - moodle.git/commitdiff
Notice on quiz config.html page.
authortjhunt <tjhunt>
Mon, 13 Aug 2007 11:19:51 +0000 (11:19 +0000)
committertjhunt <tjhunt>
Mon, 13 Aug 2007 11:19:51 +0000 (11:19 +0000)
mod/quiz/lib.php

index cd5e13f54618b86beee0bf4e1bbf902961eaabf5..4c54e62fdc9d79b4fe6d42c127e4dbcdd9abbadf 100644 (file)
@@ -570,8 +570,10 @@ function quiz_process_options(&$quiz) {
         $quiz->preventlate = 0;
     }
 
-    // Quiz name (now a required field).
-    $quiz->name = trim($quiz->name);
+    // Quiz name.
+    if (!empty($quiz->name)) {
+        $quiz->name = trim($quiz->name);
+    }
 
     // Time limit. (Get rid of it if the checkbox was not ticked.)
     if (empty($quiz->timelimitenable)) {