Skip to content

Commit

Permalink
Fix bug with getting the capability.
Browse files Browse the repository at this point in the history
  • Loading branch information
tjhunt committed Sep 20, 2006
1 parent 027d048 commit 40cc892
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mod/quiz/attempt.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@
require_login($course->id, false, $cm);
$isteacher = has_capability('mod/quiz:grade', get_context_instance(CONTEXT_MODULE, $cm->id));

$coursecontext = get_context_instance(CONTEXT_COURSE, $id); // course context
$coursecontext = get_context_instance(CONTEXT_COURSE, $cm->course); // course context
$context = get_context_instance(CONTEXT_MODULE, $cm->id);

// if no questions have been set up yet redirect to edit.php
if (!$quiz->questions and has_capability('mod/quiz:manage', $context)) {
redirect('edit.php?quizid=' . $quiz->id);
Expand Down Expand Up @@ -379,7 +380,6 @@
// We have now finished processing form data
}


/// Finish attempt if requested
if ($finishattempt) {

Expand Down

0 comments on commit 40cc892

Please sign in to comment.