Permalink
Browse files

Merge branch 'wip-MDL-34476-stable22' of git://github.com/phalacee/mo…

…odle into MOODLE_22_STABLE
  • Loading branch information...
2 parents 414568e + b244e7d commit 57264882c7fbde6bf4e6cf6c6f9caa21e7867c0c Sam Hemelryk committed Sep 26, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 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 5726488

Please sign in to comment.