Detected @ 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:
Sorry, but you do not currently have permissions to update calendar event
|
|
More information about this error
|
|
Stack trace:
|
line 421 of /lib/setuplib.php: moodle_exception thrown
|
line 1969 of /calendar/lib.php: call to print_error()
|
line 2379 of /calendar/lib.php: call to calendar_event->update()
|
line 1290 of /mod/quiz/lib.php: call to calendar_event::create()
|
line 172 of /mod/quiz/overrideedit.php: call to quiz_update_events()
|
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:
stdClass Object
|
(
|
[description] => xxxxxxxxxxxx
|
[courseid] => 0
|
[groupid] => 0
|
[userid] => 5
|
[modulename] => quiz
|
[instance] => 1
|
[timestart] => 1445001300
|
[timeduration] => 0
|
[visible] => 1
|
[eventtype] => close
|
[name] => One Quiz - Override (Quiz closes)
|
)
|
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.
Ciao
- blocks
-
MDLQA-697 CLONE - A teacher can set whether responses, answers and feedback are displayed after attempting a quiz
- Passed