Skip to content

Commit

Permalink
MDL-13117 - course info was unavailable to students. There was broken…
Browse files Browse the repository at this point in the history
… logic...

course_parent_visible() always returns true if $CFG->allowvisiblecoursesinhiddencategories
is true,
  • Loading branch information
poltawski committed Jan 25, 2008
1 parent 82d6066 commit ce76e69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion course/info.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
}

$context = get_context_instance(CONTEXT_COURSE, $course->id);
if ((!(course_parent_visible($course) && $CFG->allowvisiblecoursesinhiddencategories) || (! $course->visible)) && !has_capability('moodle/course:viewhiddencourses', $context)) {
if ((!course_parent_visible($course) || (! $course->visible)) && !has_capability('moodle/course:viewhiddencourses', $context)) {
error(get_string('coursehidden'), $CFG->wwwroot .'/');
}

Expand Down

0 comments on commit ce76e69

Please sign in to comment.