Permalink
Browse files

fixes MDL-14770, $course_id error

  • Loading branch information...
1 parent a5ba72c commit edc70eac6931d3817a9d2e662c6f33b934f276d3 diml committed May 9, 2008
Showing with 1 addition and 1 deletion.
  1. +1 −1 search/querylib.php
View
@@ -395,7 +395,7 @@ private function can_display(&$user, $this_id, $doctype, $course_id, $group_id,
// if user is enrolled or is allowed user and course is hidden, can he see it ?
$visibility = get_field('course', 'visible', 'id', $course_id);
if ($visibility <= 0){
- if (!has_capability('moodle/course:viewhiddencourses', get_context_instance(CONTEXT_COURSE, $course->id))){
+ if (!has_capability('moodle/course:viewhiddencourses', get_context_instance(CONTEXT_COURSE, $course_id))){
return false;
}
}

0 comments on commit edc70ea

Please sign in to comment.