diff --git a/calendar/classes/external/event_exporter_base.php b/calendar/classes/external/event_exporter_base.php index a6bef22d17e..d2d9923d713 100644 --- a/calendar/classes/external/event_exporter_base.php +++ b/calendar/classes/external/event_exporter_base.php @@ -248,6 +248,9 @@ class event_exporter_base extends exporter { $values['iscourseevent'] = false; $values['iscategoryevent'] = false; if ($moduleproxy = $event->get_course_module()) { + // We need a separate property to flag if an event is action event. + // That's required because canedit return true but action action events cannot be edited on the calendar UI. + // But they are considered editable because you can drag and drop the event on the month view. $values['isactionevent'] = true; } else if ($event->get_type() == 'course') { $values['iscourseevent'] = true; diff --git a/calendar/templates/event_item.mustache b/calendar/templates/event_item.mustache index 91d07519887..721d681b714 100644 --- a/calendar/templates/event_item.mustache +++ b/calendar/templates/event_item.mustache @@ -49,9 +49,11 @@ {{#pix}}t/delete, core, {{#str}}delete{{/str}}{{/pix}} {{/candelete}} - - {{#pix}}t/edit, core, {{#str}}edit{{/str}}{{/pix}} - + {{^isactionevent}} + + {{#pix}}t/edit, core, {{#str}}edit{{/str}}{{/pix}} + + {{/isactionevent}} {{/canedit}} {{#icon}}{{#pix}} {{key}}, {{component}}, {{alttext}} {{/pix}}{{/icon}}