Permalink
Browse files

MDL-37338 Calendar: User will not see calendar subscription, which he…

…/she can't edit

Signed-off-by: Rajesh Taneja <rajesh@moodle.com>
  • Loading branch information...
1 parent 4ea25c2 commit a608b0e670fe2cc5713e69ea7d7a933d0aede038 Rajesh Taneja committed with stronk7 Jan 14, 2013
Showing with 8 additions and 0 deletions.
  1. +8 −0 calendar/managesubscriptions.php
@@ -115,6 +115,14 @@
$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.

0 comments on commit a608b0e

Please sign in to comment.