Permalink
Browse files

MDL-45126 do not allow guests see name and summary of hidden course

  • Loading branch information...
1 parent 437240b commit ec22de0a5eba3aed441995cfc3228415797613bb @marinaglancy marinaglancy committed with danpoltawski Apr 16, 2014
Showing with 4 additions and 0 deletions.
  1. +4 −0 enrol/index.php
View
@@ -43,6 +43,10 @@
redirect("$CFG->wwwroot/");
}
+if (!$course->visible && !has_capability('moodle/course:viewhiddencourses', context_course::instance($course->id))) {
+ print_error('coursehidden');
+}
+
$PAGE->set_course($course);
$PAGE->set_pagelayout('course');
$PAGE->set_url('/enrol/index.php', array('id'=>$course->id));

0 comments on commit ec22de0

Please sign in to comment.