mirror of
https://github.com/moodle/moodle.git
synced 2025-04-25 10:26:17 +02:00
MDL-61450 calendar: fix course event type permissions
This commit is contained in:
parent
9528b1ff5b
commit
ec482557a8
@ -2203,8 +2203,8 @@ function calendar_view_event_allowed(calendar_event $event) {
|
||||
if (has_capability('moodle/calendar:manageentries', $event->context)) {
|
||||
return true;
|
||||
}
|
||||
$mycourses = enrol_get_my_courses('id');
|
||||
return isset($mycourses[$event->courseid]);
|
||||
|
||||
return can_access_course(get_course($event->courseid));
|
||||
} else if ($event->userid) {
|
||||
if ($event->userid != $USER->id) {
|
||||
// No-one can ever see another users events.
|
||||
|
Loading…
x
Reference in New Issue
Block a user