MDL-16263 A way for students to flag/bookmark, particular questions during a quiz attempt for later review.

This is an initial implementation that is now at a working state, but with a few things left to do. It seemed like a good idea to commit it before leaving work on Friday night.
This commit is contained in:
tjhunt 2008-08-29 10:08:27 +00:00
parent 57f43d239a
commit 62e76c6766
18 changed files with 340 additions and 29 deletions

View file

@ -68,10 +68,13 @@
$quiz->review = $CFG->quiz_review;
require_login($courseid, false);
$quiz->course = $courseid;
$context = get_context_instance(CONTEXT_COURSE, $courseid);
} else if (!$quiz = $DB->get_record('quiz', array('id' => $quizid))) {
print_error('invalidquizid', 'quiz', '', $quizid);
} else {
require_login($quiz->course, false, get_coursemodule_from_instance('quiz', $quizid, $quiz->course));
$cm = get_coursemodule_from_instance('quiz', $quizid, $quiz->course);
require_login($quiz->course, false, $cm);
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
}
@ -187,7 +190,7 @@
}
// TODO: should not use quiz-specific function here
$options = quiz_get_renderoptions($quiz->review, $curstate);
$options = quiz_get_renderoptions($quiz, $attempt, $context, $curstate);
// Fill in the correct responses (unless the question is in readonly mode)
if ($fillcorrect && !$options->readonly) {