MDL-26369 fix notice caused by the fix for MDL-26098.

This commit is contained in:
Tim Hunt
2011-02-11 14:15:43 +00:00
parent d911c72bf9
commit 2e5ce83f11
+2 -1
View File
@@ -916,7 +916,8 @@ function quiz_get_reviewoptions($quiz, $attempt, $context) {
}
// Show a link to the comment box only for closed attempts
if ($attempt->timefinish && has_capability('mod/quiz:grade', $context)) {
if (!empty($attempt->id) && $attempt->timefinish &&
has_capability('mod/quiz:grade', $context)) {
$options->questioncommentlink = new moodle_url('/mod/quiz/comment.php', array('attempt' => $attempt->id));
}