Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

…w event
  • Loading branch information...
commit 7bd8e21ec432b2bd69202d1e32b4273f26fab989 1 parent eddceb6
rwijaya authored April 30, 2012

Showing 1 changed file with 1 addition and 0 deletions. Show diff stats Hide diff stats

  1. 1  calendar/lib.php
1  calendar/lib.php
@@ -1552,6 +1552,7 @@ function calendar_get_allowed_types(&$allowed, $course = null) {
1552 1552
         }
1553 1553
         if ($course->id != SITEID) {
1554 1554
             $coursecontext = get_context_instance(CONTEXT_COURSE, $course->id);
  1555
+            $allowed->user = has_capability('moodle/calendar:manageownentries', $coursecontext);
1555 1556
 
1556 1557
             if (has_capability('moodle/calendar:manageentries', $coursecontext)) {
1557 1558
                 $allowed->courses = array($course->id => 1);

0 notes on commit 7bd8e21

Please sign in to comment.
Something went wrong with that request. Please try again.