Permalink
Browse files

Merge branch 'MDL-26369' of git://github.com/timhunt/moodle

  • Loading branch information...
stronk7 committed Feb 14, 2011
2 parents fe1776b + 2e5ce83 commit 46388c9cf97e9e67f705dd08369cd547307d8516
Showing with 2 additions and 1 deletion.
  1. +2 −1 mod/quiz/locallib.php
View
@@ -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 46388c9

Please sign in to comment.