Commit 2e5ce83f authored by Tim Hunt's avatar Tim Hunt
Browse files

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

parent d911c72b
......@@ -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));
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment