]> git.mjollnir.org Git - moodle.git/commitdiff
Fix notice in essay question.
authortjhunt <tjhunt>
Fri, 6 Jul 2007 13:30:16 +0000 (13:30 +0000)
committertjhunt <tjhunt>
Fri, 6 Jul 2007 13:30:16 +0000 (13:30 +0000)
question/type/essay/questiontype.php

index 84bb0fc55ad89fec546a0675ae87141bc617e81b..7f22bf89ed37f8c04d670a66480260c1acdd4b1c 100644 (file)
@@ -75,7 +75,7 @@ class question_essay_qtype extends default_questiontype {
 
         // feedback handling
         $feedback = '';
-        if ($options->feedback) {
+        if ($options->feedback && !empty($answers)) {
             foreach ($answers as $answer) {
                 $feedback = format_text($answer->feedback, '', $formatoptions, $cmoptions->course);
             }