Permalink
Browse files

Merge branch 'MDL-18335b_m19' of git://github.com/rwijaya/moodle into…

… MOODLE_19_STABLE
  • Loading branch information...
2 parents be0f5bf + 4928e13 commit a9375cc95d5bc70a49d782bd8c070be33bd42d5a @danpoltawski danpoltawski committed May 7, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 calendar/lib.php
View
@@ -1582,6 +1582,7 @@ function calendar_get_allowed_types(&$allowed) {
if(!empty($SESSION->cal_course_referer) && $SESSION->cal_course_referer != SITEID) {
$course = get_record('course', 'id', $SESSION->cal_course_referer);
$coursecontext = get_context_instance(CONTEXT_COURSE, $SESSION->cal_course_referer);
+ $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 a9375cc

Please sign in to comment.