Skip to content

Commit

Permalink
Merge branch 'MDL-30683_21' of git://github.com/timhunt/moodle into M…
Browse files Browse the repository at this point in the history
…OODLE_21_STABLE
  • Loading branch information
Sam Hemelryk committed Dec 19, 2011
2 parents f158171 + 88c2d10 commit 0bc0394
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions mod/quiz/report/attemptsreport.php
Original file line number Diff line number Diff line change
Expand Up @@ -298,15 +298,16 @@ protected function add_time_columns(&$columns, &$headers) {
* @param object $quiz the quiz settings.
* @param array $columns the list of columns. Added to.
* @param array $headers the columns headings. Added to.
* @param bool $includefeedback whether to include the feedbacktext columns
*/
protected function add_grade_columns($quiz, &$columns, &$headers) {
protected function add_grade_columns($quiz, &$columns, &$headers, $includefeedback = true) {
if ($this->should_show_grades($quiz)) {
$columns[] = 'sumgrades';
$headers[] = get_string('grade', 'quiz') . '/' .
quiz_format_grade($quiz, $quiz->grade);
}

if (quiz_has_feedback($quiz)) {
if ($includefeedback && quiz_has_feedback($quiz)) {
$columns[] = 'feedbacktext';
$headers[] = get_string('feedback', 'quiz');
}
Expand Down
2 changes: 1 addition & 1 deletion mod/quiz/report/overview/report.php
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ public function display($quiz, $cm, $course) {
$headers[] = get_string('regrade', 'quiz_overview');
}

$this->add_grade_columns($quiz, $columns, $headers);
$this->add_grade_columns($quiz, $columns, $headers, false);

$this->set_up_table_columns(
$table, $columns, $headers, $reporturl, $displayoptions, false);
Expand Down

0 comments on commit 0bc0394

Please sign in to comment.