Due date and start date are now optional, as requested in bug 867 and bug 3635

This commit is contained in:
gustav_delius 2005-07-07 17:16:56 +00:00
parent a61a956c65
commit bb52d44c6a
9 changed files with 175 additions and 91 deletions

View file

@ -50,10 +50,10 @@
redirect('view.php?q='.$quiz->id);
}
if ((time() - $attempt->timefinish) > 120) { // always allow review right after attempt
if (time() < $quiz->timeclose and !($quiz->review & QUIZ_REVIEW_OPEN)) {
if ((!$quiz->timeclose or time() < $quiz->timeclose) and !($quiz->review & QUIZ_REVIEW_OPEN)) {
redirect('view.php?q='.$quiz->id, get_string("noreviewuntil", "quiz", userdate($quiz->timeclose)));
}
if (time() >= $quiz->timeclose and !($quiz->review & QUIZ_REVIEW_CLOSED)) {
if ($quiz->timeclose and time() >= $quiz->timeclose and !($quiz->review & QUIZ_REVIEW_CLOSED)) {
redirect('view.php?q='.$quiz->id, get_string("noreview", "quiz"));
}
}