Skip to content
Browse files

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

  • Loading branch information...
1 parent d911c72 commit 2e5ce83f115efb4ab088e92f1fef7b7992cd530f @timhunt timhunt committed Feb 11, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 mod/quiz/locallib.php
View
3 mod/quiz/locallib.php
@@ -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));
}

0 comments on commit 2e5ce83

Please sign in to comment.
Something went wrong with that request. Please try again.