From 8cd16e9d7190ac182921f33004ed572ca5f5ee2f Mon Sep 17 00:00:00 2001 From: Ankit Agarwal Date: Thu, 23 Feb 2012 11:27:05 +0530 Subject: [PATCH] MDL-31466 tags: Fixed context bug --- tag/coursetagslib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tag/coursetagslib.php b/tag/coursetagslib.php index 441430247f491..14b3af79e0be9 100644 --- a/tag/coursetagslib.php +++ b/tag/coursetagslib.php @@ -397,7 +397,7 @@ function coursetag_get_tagged_courses($tagid) { foreach ($crs as $c) { $course = $DB->get_record('course', array('id'=>$c->itemid)); // check if the course is hidden - if ($course->visible == 1 || has_capability('moodle/course:viewhiddencourses', context_course::instance($course->id))) { + if ($course->visible == 1 || has_capability('moodle/course:viewhiddencourses', get_context_instance(CONTEXT_COURSE, $course->id))) { $courses[$c->itemid] = $course; } }