From c0270961a8a18bb225dce039874e6199d5d119ce Mon Sep 17 00:00:00 2001 From: Tim Hunt Date: Mon, 16 Apr 2012 18:01:02 +0100 Subject: [PATCH] MDL-32322 more changes to make the code more similar before refactoring. --- mod/quiz/report/responses/report.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/mod/quiz/report/responses/report.php b/mod/quiz/report/responses/report.php index 7118daeea20..dfa2ff77b25 100644 --- a/mod/quiz/report/responses/report.php +++ b/mod/quiz/report/responses/report.php @@ -124,15 +124,7 @@ class quiz_responses_report extends quiz_attempts_report { } $hasstudents = $students && (!$currentgroup || $groupstudents); - if ($hasquestions && ($hasstudents || $attemptsmode == self::ALL_ATTEMPTS)) { - // Print information on the grading method and whether we are displaying. - if (!$table->is_downloading()) { - // Do not print notices when downloading. - if ($strattempthighlight = quiz_report_highlighting_grading_method( - $quiz, $this->qmsubselect, $options->onlygraded)) { - echo '
' . $strattempthighlight . '
'; - } - } + if ($hasquestions && ($hasstudents || $options->attempts == self::ALL_ATTEMPTS)) { list($fields, $from, $where, $params) = $table->base_sql($allowed); @@ -140,6 +132,14 @@ class quiz_responses_report extends quiz_attempts_report { $table->set_sql($fields, $from, $where, $params); + if (!$table->is_downloading()) { + // Print information on the grading method. + if ($strattempthighlight = quiz_report_highlighting_grading_method( + $quiz, $this->qmsubselect, $options->onlygraded)) { + echo '
' . $strattempthighlight . '
'; + } + } + // Define table columns. $columns = array(); $headers = array();