From d1a83777f9986c997190681beb63b2bac2a8a391 Mon Sep 17 00:00:00 2001 From: tjhunt Date: Thu, 16 Apr 2009 03:12:20 +0000 Subject: [PATCH] quiz editing: MDL-18871 logic was backwards for deciding whether to show the 'This quiz is not graded, so you cannot set overall feedback that differs by grade' warning introduced in MDL-18583. --- mod/quiz/mod_form.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mod/quiz/mod_form.php b/mod/quiz/mod_form.php index 73f29834c4c..c5b01c161bb 100644 --- a/mod/quiz/mod_form.php +++ b/mod/quiz/mod_form.php @@ -225,7 +225,8 @@ class mod_quiz_mod_form extends moodleform_mod { if (empty($this->_cm)) { $needwarning = $CFG->quiz_maximumgrade == 0; } else { - $needwarning = get_field('quiz', 'grade', 'id', $this->_instance); + $quizgrade = get_field('quiz', 'grade', 'id', $this->_instance); + $needwarning = $quizgrade == 0; } if ($needwarning) { $mform->addElement('static', 'nogradewarning', '', get_string('nogradewarning', 'quiz'));