-
Bug
-
Resolution: Fixed
-
Minor
-
3.2
-
MOODLE_32_STABLE
-
MOODLE_33_STABLE
-
MDL-55956-master-5 -
-
3.3 Project Team Sprint 3
If you have a module that creates calendar events, eg quiz lesson and soon to be assign, and you have multiple overrides for groups as well as user overrides, then the user see's all of these events when really they should only see just the ones that apply to them. This is related to but distinct from MDL-55955. I've logged this as a bug, but you could argue it's a feature.
There are two ways this could be solved, one is a workaround in the various modules which support overrides, which is as soon as any overrides are added it deletes the module event and then creates individual events for every student personalized to them, which is horrible from a code point of view.
The better approach is to add a 'priority' field to the calendar events, and if a bunch of events are loaded which all have identical modulename, instance, and eventtype, then only the event with the highest priority is shown. It is not enough for the calendar api to try and de-duplicate based on userid / groupid alone because a student can be in multiple groups, and the semantics of which override wins is up to the module. Currently the modules union all the dates together which is imho weird, a better solution is to give each override an explicit order and apply only one. This same order could then be given to the calendar api so it can de-duplicate the events.
The calendar api would also need to do some extra logic so when searching for an event within a certain range, if it find an event it also needs to check for other events outside that range which have the same (modulename, instance, and eventtype) so it can confirm the first one it found really is the right one.
- blocks
-
MDL-29795 Add user/group overrides for mod/assign
- Closed
-
MDL-58087 Make sure event overrides (user, group) are obeyed on dashboard page
- Closed
- caused a regression
-
MDL-60128 Calendar export via URL does not export group and user events
- Closed
- is duplicated by
-
MDL-57440 Prevent duplicated calendar events
- Closed
- will be (partly) resolved by
-
MDL-58737 refresh_mod_calendar_events_task adhoc task called from upgrade.php
- Closed