Skip to content

Commit

Permalink
Don't apply lateness check when teacher previews.
Browse files Browse the repository at this point in the history
  • Loading branch information
gustav_delius committed Feb 15, 2006
1 parent adaa8c8 commit b2a90f7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mod/quiz/questionlib.php
Expand Up @@ -775,7 +775,7 @@ function quiz_apply_penalty_and_timelimit(&$question, &$state, $attempt, $cmopti
$state->grade = $state->raw_grade;
}

// deal with timeimit
// deal with timelimit
if ($cmoptions->timelimit) {
// We allow for 5% uncertainty in the following test
if (($state->timestamp - $attempt->timestart) > ($cmoptions->timelimit * 63)) {
Expand All @@ -784,7 +784,8 @@ function quiz_apply_penalty_and_timelimit(&$question, &$state, $attempt, $cmopti
}

// deal with closing time
if ($cmoptions->timeclose and $state->timestamp > ($cmoptions->timeclose + 60)) { // allowing 1 minute lateness
if ($cmoptions->timeclose and $state->timestamp > ($cmoptions->timeclose + 60) // allowing 1 minute lateness
and !$attempt->preview) { // ignore closing time for previews
$state->grade = 0;
}

Expand Down

0 comments on commit b2a90f7

Please sign in to comment.