Merge branch 'MDL-73996-master-fix' of https://github.com/junpataleta/moodle
[moodle.git] / calendar / upgrade.txt
blob3349bc7afddb02477ec531b0293a55003bb6d47e
1 This files describes API changes in /calendar/* ,
2 information provided here is intended especially for developers.
4 === 4.0 ===
5 * The following external functions now accepts an optional parameter 'searchvalue' to search the events:
6   - core_calendar_external::get_calendar_action_events_by_timesort
7   - core_calendar_external::get_calendar_action_events_by_courses
8   - core_calendar_external::get_calendar_action_events_by_course
9 * Added core_calendar_delete_subscription, which allows to delete the calendar subscription.
10 * Updated calendar_can_manage_user_event() function to check permissions to user events.
11 * The following functions have been deprecated because they were no longer used:
12   - calendar_process_subscription_row()
13   - calendar_import_icalendar_events()
14 * The following has been removed after being deprecated in 3.8
15   * CALENDAR_EVENT_GLOBAL
16 * The following have been deprecated because the three-month pseudo block has been removed:
17   - fake_block_threemonths() renderer method.
18   - calendar_threemonth.js.
19   - calendar_threemonth and threemonth_month templates.
20   - Behat step definitions i_hover_over_day_of_this_month_in_calendar and i_click_day_of_this_month_in_calendar.
22 === 3.10 ===
23 * The core_calendar\local\event\value_objects\times_interface class now has new method get_usermidnight_time() which
24   returns the user midnight time for a given event.
26 === 3.9 ===
27 * Plugins can now create their own calendar events, both standard and action ones. To do it they need to specify
28   $event->component when creating an event. Component events can not be edited or deleted manually.
29   See https://docs.moodle.org/dev/Calendar_API#Component_events
30 * The following functions have been deprecated because they were no longer used:
31   - calendar_add_event_metadata()
32   - core_calendar_renderer::event()
34 === 3.8 ===
35 * The following functions have been finally deprecated and can not be used anymore:
36   * calendar_wday_name()
37   * calendar_get_block_upcoming()
38   * calendar_print_month_selector()
39   * calendar_cron()
40   * calendar_get_mini()
41   * calendar_get_upcoming()
42 * Added core_calendar_external::get_timestamps(), which allows an array containing an arbitrary number of arrays of
43   date/time data to be converted and returned as timestamps, along with an optional key.
45 === 3.6 ===
46 * calendar_get_default_courses() function now has optional $userid parameter.
47 * calendar_set_filters() function now has optional $user parameter.
48 * The core_calendar\local\event\container class now provides two new helper methods for getting and setting the requesting user:
49   set_requesting_user() and get_requesting_user().
50 * The following functions have been finally deprecated and can not be used anymore:
51   * calendar_preferences_button()
52 * added core_calendar_get_valid_event_timestart_range callback for course events when the update_event_start_day function is used
53   in the local api.
55 === 3.5 ===
56 * core_calendar_external::get_calendar_events now returns the categoryid for category events.
58 === 3.4 ===
59 * calendar_get_mini, and calendar_get_upcoming have been deprecated. Please update to use the new exporters and renderers.
60 * added core_calendar_get_valid_event_timestart_range and core_calendar_event_timestart_updated callbacks for module events
61   when the update_event_start_day function is used in the local api.
63 === 3.3 ===
64 * calendar_event_hook() has been removed. Developers should be using the Moodle events system to achieve this behaviour,
65   rather than using a hacky calendar specific implementation.
66 * calendar_wday_name() is deprecated and no longer used in core.
67 * calendar_get_block_upcoming() is deprecated, please use block_calendar_upcoming::get_upcoming_content() instead.
68 * calendar_print_month_selector() is deprecated and no longer used in core.
69 * calendar_cron() is deprecated and should not be used. Please use the core\task\calendar_cron_task instead.
71 === 3.2 ===
72 * calendar_preferences_button() is now deprecated. Calendar preferences have been moved to the user preferences page.
74 === 2.9 ===
75 default values changes in code:
76 * core_calendar_external::get_calendar_events_parameters() 'timeend' default option changed; now, by default,
77   all events are returned, not only the past ones.
78 * calendar types need to be updated to be compatible with standard PHP date/time code
80 === 2.5 ===
81 required changes in code:
82 * calendar_add_icalendar_event() now requires a valid subscriptionid
83 * calendar_process_subscription_row() throws exception for invalid subscriptionid
84 * calendar_update_subscription_events() now throws a dml_exception instead of moodle_exception for bad subscriptions
85 * calendar_get_mini() function now has optional $placement and $courseid paramaters.
87 optional - no changes needed:
88 * calendar_update_subscription() should now be used to update Ical subscriptions.
90 === 2.4 ===
92 required changes in code:
94 * calendar_get_popup() function now just returns id, instead of the string "id=$id"