mirror of
https://github.com/moodle/moodle.git
synced 2025-04-15 13:33:52 +02:00
MDL-18094: course/viewhiddenactivities didn't work (in some parts of the code) at module level
This commit is contained in:
parent
7fa95ef177
commit
2bf69a8588
@ -2149,7 +2149,7 @@ function require_login($courseorid=0, $autologinguest=true, $cm=null, $setwantsu
|
||||
|
||||
/// Make sure they can read this activity too, if specified
|
||||
|
||||
if (!empty($cm) and !$cm->visible and !has_capability('moodle/course:viewhiddenactivities', $cm->context)) {
|
||||
if (!empty($cm) && !$cm->visible && !has_capability('moodle/course:viewhiddenactivities', $cm->context)) {
|
||||
redirect($CFG->wwwroot.'/course/view.php?id='.$cm->course, get_string('activityiscurrentlyhidden'));
|
||||
}
|
||||
user_accesstime_log($COURSE->id); /// Access granted, update lastaccess times
|
||||
|
Loading…
x
Reference in New Issue
Block a user