Permalink
Browse files

MDL-12264 - course/info: check if course is hidden before displaying …

…info about it.

Author: Matt Clarkson <mattc@catalyst.net.nz>
  • Loading branch information...
1 parent 9b86470 commit 1a5bc8ae5a56cd8f3e6eb0cfc45d243cc54628ed mattc-catalyst committed Nov 20, 2007
Showing with 4 additions and 0 deletions.
  1. +4 −0 course/info.php
View
@@ -28,6 +28,10 @@
require_login();
}
+ if (!(course_parent_visible($course) || $course->visible) && !has_capability('moodle/course:viewhiddencourses', $context)) {
+ error(get_string('coursehidden'), $CFG->wwwroot .'/');
+ }
+
print_header(get_string("summaryof", "", $course->fullname));
print_heading(format_string($course->fullname) . '<br />(' . format_string($course->shortname) . ')');

0 comments on commit 1a5bc8a

Please sign in to comment.