Fix so that secure window closes itself even when no review is allowed, see bug 3891

This commit is contained in:
gustav_delius 2005-08-26 19:24:17 +00:00
parent aca55f679c
commit e484e8f915

View File

@ -47,7 +47,15 @@
// If not even responses are to be shown in review then we
// don't allow any review
if (!($quiz->review & QUIZ_REVIEW_RESPONSES)) {
redirect('view.php?q='.$quiz->id);
if (empty($popup)) {
redirect('view.php?q='.$quiz->id);
} else {
?><script type="text/javascript">
opener.document.location.reload();
self.close();
</script><?php
die();
}
}
if ((time() - $attempt->timefinish) > 120) { // always allow review right after attempt
if ((!$quiz->timeclose or time() < $quiz->timeclose) and !($quiz->review & QUIZ_REVIEW_OPEN)) {