From cdf3cdd608ddc1fea908f6b71fac1c92201b4718 Mon Sep 17 00:00:00 2001 From: Henning Bostelmann Date: Tue, 30 Sep 2014 19:39:29 +0100 Subject: [PATCH] MDL-47474 Calendar export: Fix user id in authorization check --- calendar/export_execute.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } }