mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
Merge branch 'wip-MDL-36906-master' of git://github.com/abgreeve/moodle
This commit is contained in:
commit
bb682c1ac2
@ -75,8 +75,10 @@ if ($rid) {
|
||||
|
||||
require_course_login($course, true, $cm);
|
||||
|
||||
$context = context_module::instance($cm->id);
|
||||
|
||||
/// If it's hidden then it's don't show anything. :)
|
||||
if (empty($cm->visible) and !has_capability('moodle/course:viewhiddenactivities',context_module::instance($cm->id))) {
|
||||
if (empty($cm->visible) and !has_capability('moodle/course:viewhiddenactivities', $context)) {
|
||||
$PAGE->set_title($data->name);
|
||||
echo $OUTPUT->header();
|
||||
notice(get_string("activityiscurrentlyhidden"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user