mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
MDL-37338 Calendar: User will not see calendar subscription, which he/she can't edit
Signed-off-by: Rajesh Taneja <rajesh@moodle.com>
This commit is contained in:
parent
4ea25c227c
commit
a608b0e670
1 changed files with 8 additions and 0 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue