Merge branch 'MDL-28222' of git://github.com/timhunt/moodle
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Wed, 6 Jul 2011 18:27:52 +0000 (20:27 +0200)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Wed, 6 Jul 2011 18:27:52 +0000 (20:27 +0200)
mod/quiz/report/attemptsreport.php

index 1df5d9b..4a4698f 100644 (file)
@@ -469,15 +469,15 @@ abstract class quiz_attempt_report_table extends table_sql {
             return '-';
         }
 
-        if (!$this->is_downloading()) {
-            return quiz_report_feedback_for_grade(
-                    quiz_rescale_grade($attempt->sumgrades, $this->quiz, false),
-                    $this->quiz->id, $this->context);
-        } else {
-            return strip_tags(quiz_report_feedback_for_grade(
-                    quiz_rescale_grade($attempt->sumgrades, $this->quiz, false),
-                    $this->quiz->id));
+        $feedback = quiz_report_feedback_for_grade(
+                quiz_rescale_grade($attempt->sumgrades, $this->quiz, false),
+                $this->quiz->id, $this->context);
+
+        if ($this->is_downloading()) {
+            $feedback = strip_tags($feedback);
         }
+
+        return $feedback;
     }
 
     public function get_row_class($attempt) {