MDL-42548 quiz review: don't show grade for non-finished attempts.

Now we show the attempt state separately, so there is no need to show
Grade: Attempt still in progress - especially since we were showing that
for abandoned and overdue attempts which is just wrong.
This commit is contained in:
Tim Hunt 2013-10-25 20:08:17 +01:00
parent 68291f2d57
commit 6c7e553fc4

View File

@ -187,10 +187,7 @@ $grade = quiz_rescale_grade($attempt->sumgrades, $quiz, false);
if ($options->marks >= question_display_options::MARK_AND_MAX && quiz_has_grades($quiz)) {
if ($attempt->state != quiz_attempt::FINISHED) {
$summarydata['grade'] = array(
'title' => get_string('grade', 'quiz'),
'content' => get_string('attemptstillinprogress', 'quiz'),
);
// Cannot display grade.
} else if (is_null($grade)) {
$summarydata['grade'] = array(