]> git.mjollnir.org Git - moodle.git/commitdiff
quiz editing: MDL-18871 logic was backwards for deciding whether to show the 'This...
authortjhunt <tjhunt>
Thu, 16 Apr 2009 03:12:27 +0000 (03:12 +0000)
committertjhunt <tjhunt>
Thu, 16 Apr 2009 03:12:27 +0000 (03:12 +0000)
mod/quiz/mod_form.php

index 20f9649a62b18063de6c3ae815bdad1e04b12234..7d30863c4e77da08d658f71bc5348fb500ea0dd8 100644 (file)
@@ -276,7 +276,8 @@ class mod_quiz_mod_form extends moodleform_mod {
         if (empty($this->_cm)) {
             $needwarning = $quizconfig->maximumgrade == 0;
         } else {
-            $needwarning = $DB->get_field('quiz', 'grade', array('id' => $this->_instance));
+            $quizgrade = $DB->get_field('quiz', 'grade', array('id' => $this->_instance));
+            $needwarning = $quizgrade == 0;
         }
         if ($needwarning) {
             $mform->addElement('static', 'nogradewarning', '', get_string('nogradewarning', 'quiz'));