diff --git a/calendar/export_execute.php b/calendar/export_execute.php index 5a53e7edfe7..03f928191e2 100644 --- a/calendar/export_execute.php +++ b/calendar/export_execute.php @@ -31,6 +31,8 @@ if (!$authuserid && !$authusername) { die('Invalid authentication'); } +$PAGE->set_context(context_system::instance()); + // Get the calendar type we are using. $calendartype = \core_calendar\type_factory::get_calendar_instance();