Merge branch 'MDL-18335' of git://github.com/rwijaya/moodle
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user