From 81308ee649efd0513bbdc13c0f7d801fae9ce2d1 Mon Sep 17 00:00:00 2001 From: Rossiani Wijaya Date: Mon, 30 Apr 2012 17:38:10 +0800 Subject: [PATCH] MDL-18335 calendar event: fixed role capability checking to create new event --- calendar/lib.php | 1 + 1 file changed, 1 insertion(+) diff --git a/calendar/lib.php b/calendar/lib.php index a6bc06977ed..d6f3a0273ac 100644 --- a/calendar/lib.php +++ b/calendar/lib.php @@ -1552,6 +1552,7 @@ function calendar_get_allowed_types(&$allowed, $course = null) { } if ($course->id != SITEID) { $coursecontext = get_context_instance(CONTEXT_COURSE, $course->id); + $allowed->user = has_capability('moodle/calendar:manageownentries', $coursecontext); if (has_capability('moodle/calendar:manageentries', $coursecontext)) { $allowed->courses = array($course->id => 1);