Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
679e323
)
MDL-45126 do not allow guests see name and summary of hidden course
author
Marina Glancy
<marina@moodle.com>
Wed, 16 Apr 2014 06:35:20 +0000
(14:35 +0800)
committer
Dan Poltawski
<dan@moodle.com>
Wed, 7 May 2014 08:22:20 +0000
(16:22 +0800)
enrol/index.php
patch
|
blob
|
blame
|
history
diff --git
a/enrol/index.php
b/enrol/index.php
index
3cc5335
..
68a12fd
100644
(file)
--- a/
enrol/index.php
+++ b/
enrol/index.php
@@
-41,6
+41,10
@@
if ($course->id == SITEID) {
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));