Skip to content

Commit

Permalink
Fixed bug 3950
Browse files Browse the repository at this point in the history
  • Loading branch information
gustav_delius committed Aug 26, 2005
1 parent c5c3568 commit e45b5f2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mod/quiz/attempt.php
Expand Up @@ -108,7 +108,9 @@
exit;
}

if ($quiz->attempts and $attemptnumber > $quiz->attempts) {
$numberofpreviousattempts = count_records_select('quiz_attempts', "quiz = '{$quiz->id}' AND " .
"userid = '{$USER->id}' AND timefinish > 0 AND preview != 1");
if ($quiz->attempts and $numberofpreviousattempts >= $quiz->attempts) {
error(get_string('nomoreattempts', 'quiz'), "view.php?id={$cm->id}");
}

Expand Down

0 comments on commit e45b5f2

Please sign in to comment.