diff --git a/calendar/export_execute.php b/calendar/export_execute.php index c502112e1a8..9f2700ebb75 100644 --- a/calendar/export_execute.php +++ b/calendar/export_execute.php @@ -175,7 +175,7 @@ $ical->add_property('method', 'PUBLISH'); foreach($events as $event) { if (!empty($event->modulename)) { $cm = get_coursemodule_from_instance($event->modulename, $event->instance); - if (!\core_availability\info_module::is_user_visible($cm, 0, false)) { + if (!\core_availability\info_module::is_user_visible($cm, $userid, false)) { continue; } }