MDL-3030 quiz overdue handling: test state, not timefinish where applicable.

This commit is contained in:
Tim Hunt 2012-04-24 15:01:12 +01:00
parent 3e77b60f36
commit be18f589e2
10 changed files with 60 additions and 42 deletions

View file

@ -184,7 +184,7 @@ if (!empty($overtime)) {
$grade = quiz_rescale_grade($attempt->sumgrades, $quiz, false);
if ($options->marks >= question_display_options::MARK_AND_MAX && quiz_has_grades($quiz)) {
if (!$attempt->timefinish) {
if ($attempt->state != quiz_attempt::FINISHED) {
$summarydata['grade'] = array(
'title' => get_string('grade', 'quiz'),
'content' => get_string('attemptstillinprogress', 'quiz'),