Permalink
Browse files

MDL-30683 don't show overall feedback in the quiz grades report.

The grades are small, while the feedback can be big, which breaks the table layout.
  • Loading branch information...
timhunt committed Dec 13, 2011
1 parent 6508da4 commit 88c2d103cacbe5956e8cc996b55dac512a07b77e
Showing with 4 additions and 3 deletions.
  1. +3 −2 mod/quiz/report/attemptsreport.php
  2. +1 −1 mod/quiz/report/overview/report.php
@@ -293,15 +293,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');
}
@@ -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);

0 comments on commit 88c2d10

Please sign in to comment.