mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
calendar MDL-19793 Fixed minor regressions caused by recent updates
This commit is contained in:
parent
720024b9c1
commit
ddaff608dc
@ -1658,6 +1658,9 @@ function calendar_add_event_allowed($event) {
|
||||
return has_capability('moodle/calendar:manageentries', get_context_instance(CONTEXT_COURSE, SITEID));
|
||||
|
||||
default:
|
||||
if (isset($event->courseid) && $event->courseid > 0) {
|
||||
return has_capability('moodle/calendar:manageentries', get_context_instance(CONTEXT_COURSE, $event->courseid));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -2051,6 +2054,8 @@ class calendar_event {
|
||||
add_to_log($this->properties->courseid, 'calendar', 'edit all', 'event.php?action=edit&id='.$this->properties->id, $this->properties->name);
|
||||
} else {
|
||||
$DB->update_record('event', $this->properties);
|
||||
$event = calendar_event::load($this->properties->id);
|
||||
$this->properties = $event->properties();
|
||||
add_to_log($this->properties->courseid, 'calendar', 'edit', 'event.php?action=edit&id='.$this->properties->id, $this->properties->name);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user