Permalink
Browse files

Quiztimer stuff added

- Skip regrading if attempt is overdued
  • Loading branch information...
1 parent 2e2a635 commit 3a088d689c86be49b6203757d3b80504721c7e4c julmis committed Jul 27, 2004
Showing with 10 additions and 1 deletion.
  1. +10 −1 mod/quiz/report/regrade/report.php
@@ -27,6 +27,15 @@ function display($quiz, $cm, $course) { /// This function just displays the
continue;
}
+ if($quiz->timelimit > 0) {
+ $timelimit = ($quiz->timelimit * 60) + 60;
+ $timetaken = $attempt->timefinish - $attempt->timestart;
+ if($timetaken > $timelimit) {
+ // Skip overdued attempts
+ continue;
+ }
+ }
+
$count->attempt++;
if (! $questions = quiz_get_attempt_questions($quiz, $attempt)) {
@@ -55,7 +64,7 @@ function display($quiz, $cm, $course) { /// This function just displays the
notify("Could not save best grade for user $userid!");
}
}
- }
+ }
print_heading(get_string("regradecomplete", "quiz"));
print_heading(get_string("regradecount", "quiz", $count));

0 comments on commit 3a088d6

Please sign in to comment.