diff --git a/calendar/managesubscriptions.php b/calendar/managesubscriptions.php index 07265bc9213..21782aaa4d6 100644 --- a/calendar/managesubscriptions.php +++ b/calendar/managesubscriptions.php @@ -115,6 +115,14 @@ $PAGE->set_button(calendar_preferences_button($course)); $renderer = $PAGE->get_renderer('core_calendar'); echo $OUTPUT->header(); + +// Filter subscriptions which user can't edit. +foreach($subscriptions as $subscription) { + if (!calendar_can_edit_subscription($subscription)) { + unset($subscriptions[$subscription->id]); + } +} + // Display a table of subscriptions. echo $renderer->subscription_details($courseid, $subscriptions, $importresults); // Display the add subscription form.