MDLQA-697, after some debugging I was able to get simple steps to reproduce it:
- As teacher, create quiz, set start/end dates for it.
- Navigation -> user overrides and create one.
- Error happens:
It seems that the quiz is trying to create user events, (with eventyped = 'close' ???) and calendar_add_event_allowed() is returning one big false, hence the error above. This is the structure of the event:
Really I'm not sure if the mistake is in the quiz, and how the event is created or in calendar and how event-creation perms are checked. It seems that there are some strange course-user dark logic (implications) there.