When a user attempts to edit an existing User event that they created and change it to a Course event, in the context of a course where they have permission to change events, they receive the nopermissiontoupdatecalendar exception.
Steps to reproduce:
- Create a user event on the calendar
- Edit the event and set it to type: course, and select a course from the dropdown list where the user is a teacher
Expected: The event should be updated to be a course event, given that the user has manageentries capability in the user context and the course context.
Actually happens: nopermissiontoupdatecalendar exception
Stack trace:
Error code: nopermissiontoupdatecalendar
- line 482 of /lib/setuplib.php: moodle_exception thrown
- line 564 of /calendar/lib.php: call to print_error()
- line 893 of /calendar/externallib.php: call to calendar_event->update()
- line 228 of /lib/externallib.php: call to core_calendar_external::submit_create_update_form()
- line 59 of /lib/ajax/service.php: call to external_api::call_external_function()
- has been marked as being related by
-
MDL-62959 Changing a course event to a user event results in an error
-
- Closed
-