Index: temp_moodle_dev/moodle/mod/quiz/reviewquestion.php =================================================================== RCS file: /usr/local/cvsroot/temp_moodle_dev/moodle/mod/quiz/reviewquestion.php,v diff -u -r1.1 -r1.2 --- temp_moodle_dev/moodle/mod/quiz/reviewquestion.php 14 Nov 2008 06:30:10 -0000 1.1 +++ temp_moodle_dev/moodle/mod/quiz/reviewquestion.php 28 Oct 2009 07:32:02 -0000 1.2 @@ -63,6 +63,7 @@ if (!$attempt->timefinish) { redirect('attempt.php?q='.$quiz->id); } + require_capability('mod/quiz:reviewmyattempts', $context); // If not even responses are to be shown in review then we // don't allow any review if (!($quiz->review & QUIZ_REVIEW_RESPONSES)) { @@ -96,6 +97,10 @@ error("Unable to load questiontype specific question information"); } + $baseurl = $CFG->wwwroot . '/mod/quiz/reviewquestion.php?question=' . $question->id . '&number=' . $number . '&attempt='; + $quiz->thispageurl = $baseurl . $attempt->id; + $quiz->cmid = $cm->id; + $session = get_record('question_sessions', 'attemptid', $attempt->uniqueid, 'questionid', $question->id); $state->sumpenalty = $session->sumpenalty; $state->manualcomment = $session->manualcomment; @@ -132,7 +137,7 @@ foreach ($attempts as $at) { $attemptlist .= ($at->id == $attempt->id) ? ''.$at->attempt.', ' - : ''.$at->attempt.', '; + : ''.$at->attempt.', '; } $table->data[] = array(get_string('attempts', 'quiz').':', trim($attemptlist, ' ,')); }