-
Bug
-
Resolution: Fixed
-
Minor
-
3.3
-
MOODLE_33_STABLE
-
MOODLE_33_STABLE
-
wip-
MDL-58867-master -
Displaying action calendar events for dashboard is currently only supported for the modules.
However there is already some code that checks if modulename is empty or not and performs different logic if it is empty.
If plugin defines an action event on the course level and specifies timesort, there are no errors/warnings while creating an event. When trying to view dashboard the "undefined" popups show up or there are fatal errors. When digging deeper one can find fatal PHP errors that terminate the script execution and WS calls return empty result.
I'm submitting a patch that at least avoids the fatal errors for the plugin devs who will try to do the same.
To reproduce:
- pick only the second commit from https://github.com/moodle/moodle/compare/master...marinaglancy:wip-MDL-58867-test
- create or edit a course in "Weeks" format
- login as a student - you will see fatal errors on the dashboard and when viewing calendar
- if you change the type of the event in the code from CALENDAR_EVENT_TYPE_ACTION to CALENDAR_EVENT_TYPE_STANDARD and then edit the course again and save (so that calendar event is updated) there will be no errors for student.