Commit | Line | Data |
---|---|---|
7df3ea15 AA |
1 | This files describes API changes in /calendar/* , |
2 | information provided here is intended especially for developers. | |
3 | ||
9a79c34e | 4 | === 3.10 === |
364d4cae MG |
5 | * The core_calendar\local\event\value_objects\times_interface class now has new method get_usermidnight_time() which |
6 | returns the user midnight time for a given event. | |
7 | ||
1a972b06 MG |
8 | === 3.9 === |
9 | * Plugins can now create their own calendar events, both standard and action ones. To do it they need to specify | |
10 | $event->component when creating an event. Component events can not be edited or deleted manually. | |
11 | See https://docs.moodle.org/dev/Calendar_API#Component_events | |
185a00c8 MG |
12 | * The following functions have been deprecated because they were no longer used: |
13 | - calendar_add_event_metadata() | |
14 | - core_calendar_renderer::event() | |
1a972b06 | 15 | |
27607e6a MM |
16 | === 3.8 === |
17 | * The following functions have been finally deprecated and can not be used anymore: | |
18 | * calendar_wday_name() | |
19 | * calendar_get_block_upcoming() | |
20 | * calendar_print_month_selector() | |
21 | * calendar_cron() | |
db9f122f MM |
22 | * calendar_get_mini() |
23 | * calendar_get_upcoming() | |
23affd76 MH |
24 | * Added core_calendar_external::get_timestamps(), which allows an array containing an arbitrary number of arrays of |
25 | date/time data to be converted and returned as timestamps, along with an optional key. | |
27607e6a | 26 | |
bd870573 SR |
27 | === 3.6 === |
28 | * calendar_get_default_courses() function now has optional $userid parameter. | |
d8c6c21c | 29 | * calendar_set_filters() function now has optional $user parameter. |
95ae74a7 SR |
30 | * The core_calendar\local\event\container class now provides two new helper methods for getting and setting the requesting user: |
31 | set_requesting_user() and get_requesting_user(). | |
216b8947 MG |
32 | * The following functions have been finally deprecated and can not be used anymore: |
33 | * calendar_preferences_button() | |
5974bfeb SR |
34 | * added core_calendar_get_valid_event_timestart_range callback for course events when the update_event_start_day function is used |
35 | in the local api. | |
bd870573 | 36 | |
e3c04bd9 JL |
37 | === 3.5 === |
38 | * core_calendar_external::get_calendar_events now returns the categoryid for category events. | |
39 | ||
5ff61146 | 40 | === 3.4 === |
41b7375c | 41 | * calendar_get_mini, and calendar_get_upcoming have been deprecated. Please update to use the new exporters and renderers. |
478b1d19 | 42 | * added core_calendar_get_valid_event_timestart_range and core_calendar_event_timestart_updated callbacks for module events |
39fe5929 | 43 | when the update_event_start_day function is used in the local api. |
5ff61146 | 44 | |
5019e695 MN |
45 | === 3.3 === |
46 | * calendar_event_hook() has been removed. Developers should be using the Moodle events system to achieve this behaviour, | |
47 | rather than using a hacky calendar specific implementation. | |
12cbce0a | 48 | * calendar_wday_name() is deprecated and no longer used in core. |
12cbce0a | 49 | * calendar_get_block_upcoming() is deprecated, please use block_calendar_upcoming::get_upcoming_content() instead. |
12cbce0a | 50 | * calendar_print_month_selector() is deprecated and no longer used in core. |
12cbce0a | 51 | * calendar_cron() is deprecated and should not be used. Please use the core\task\calendar_cron_task instead. |
5019e695 | 52 | |
9629790b | 53 | === 3.2 === |
12cbce0a | 54 | * calendar_preferences_button() is now deprecated. Calendar preferences have been moved to the user preferences page. |
9629790b | 55 | |
e07e04c1 DM |
56 | === 2.9 === |
57 | default values changes in code: | |
58 | * core_calendar_external::get_calendar_events_parameters() 'timeend' default option changed; now, by default, | |
59 | all events are returned, not only the past ones. | |
d6e7a63d | 60 | * calendar types need to be updated to be compatible with standard PHP date/time code |
e07e04c1 | 61 | |
e73b527c AA |
62 | === 2.5 === |
63 | required changes in code: | |
64 | * calendar_add_icalendar_event() now requires a valid subscriptionid | |
65 | * calendar_process_subscription_row() throws exception for invalid subscriptionid | |
66 | * calendar_update_subscription_events() now throws a dml_exception instead of moodle_exception for bad subscriptions | |
512edd65 | 67 | * calendar_get_mini() function now has optional $placement and $courseid paramaters. |
7df3ea15 | 68 | |
8aba76fd AA |
69 | optional - no changes needed: |
70 | * calendar_update_subscription() should now be used to update Ical subscriptions. | |
71 | ||
7df3ea15 AA |
72 | === 2.4 === |
73 | ||
74 | required changes in code: | |
75 | ||
76 | * calendar_get_popup() function now just returns id, instead of the string "id=$id" |