unset($data[$bands]);
return $data;
}
-function quiz_report_highlighting_grading_method($quiz, $qmsubselect, $qmfilter){
+function quiz_report_highlighting_grading_method($quiz, $qmsubselect, $qmfilter, $highlight=true){
if ($quiz->attempts == 1) {//only one attempt allowed on this quiz
return "<p>".get_string('onlyoneattemptallowed', "quiz_overview")."</p>";
} else if (!$qmsubselect){
} else if ($qmfilter){
return "<p>".get_string('showinggraded', "quiz_overview")."</p>";
}else {
- return "<p>".get_string('showinggradedandungraded', "quiz_overview",
- ('<span class="highlight">'.quiz_get_grading_option_name($quiz->grademethod).'</span>'))."</p>";
+ $a = quiz_get_grading_option_name($quiz->grademethod);
+ if ($highlight){
+ $a = '<span class="highlight">'.$a.'</span>';
+ }
+ return "<p>".get_string('showinggradedandungraded', "quiz_overview", $a)."</p>";
}
}
// 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, $qmsubselect, $qmfilter)) {
+ if ($strattempthighlight = quiz_report_highlighting_grading_method($quiz, $qmsubselect, $qmfilter, false)) {
echo '<div class="quizattemptcounts">' . $strattempthighlight . '</div>';
}
}
}
$mform->addElement('select', 'attemptsmode', get_string('show', 'quiz_overview'), $options);
if ($this->_customdata['qmsubselect']){
- $gm = '<span class="highlight">'.quiz_get_grading_option_name($this->_customdata['quiz']->grademethod).'</span>';
+ $gm = quiz_get_grading_option_name($this->_customdata['quiz']->grademethod);
$mform->addElement('advcheckbox', 'qmfilter', get_string('show', 'quiz_overview'), get_string('optonlygradedattempts', 'quiz_overview', $gm), null, array(0,1));
}
//-------------------------------------------------------------------------------