Browse files

MDL-18335 calendar event: fixed role capability checking to create ne…

…w event
  • Loading branch information...
1 parent aa753ac commit 3c0ea9b2841a3af83b3726d981d6f12d5b73bd4c @rwijaya rwijaya committed Apr 30, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 calendar/lib.php
View
1 calendar/lib.php
@@ -1740,6 +1740,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);

0 comments on commit 3c0ea9b

Please sign in to comment.