Permalink
Browse files

MDL-28222 quiz reports missing context in call to quiz_report_feedbac…

…k_for_grade.
  • Loading branch information...
1 parent 9a1da08 commit 40ff08d84f0acb4f1bc141036bbd1f03a56dfb2d @timhunt timhunt committed with stronk7 Jul 6, 2011
Showing with 8 additions and 8 deletions.
  1. +8 −8 mod/quiz/report/attemptsreport.php
View
16 mod/quiz/report/attemptsreport.php
@@ -469,15 +469,15 @@ public function col_feedbacktext($attempt) {
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) {

0 comments on commit 40ff08d

Please sign in to comment.