Skip to content
Browse files

MDL-34476 - Blocks - Fixing context issue

  • Loading branch information...
1 parent d1d4c85 commit b244e7da9ef0f15c276d57d9fab17bfcb38239aa @jsnfwlr jsnfwlr committed Sep 26, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 blocks/completionstatus/block_completionstatus.php
View
4 blocks/completionstatus/block_completionstatus.php
@@ -51,8 +51,10 @@ public function get_content() {
// Create empty content
$this->content = new stdClass();
+ $context = get_context_instance(CONTEXT_COURSE, $course->id);
+
// Can edit settings?
- $can_edit = has_capability('moodle/course:update', get_context_instance(CONTEXT_COURSE, $course->id));
+ $can_edit = has_capability('moodle/course:update', $context);
// Get course completion data
$info = new completion_info($course);

0 comments on commit b244e7d

Please sign in to comment.
Something went wrong with that request. Please try again.