1 |
efrain |
1 |
This files describes API changes in /calendar/* ,
|
|
|
2 |
information provided here is intended especially for developers.
|
|
|
3 |
|
|
|
4 |
=== 4.4 ===
|
|
|
5 |
* The following previously deprecated methods have been removed and can no longer be used:
|
|
|
6 |
- `calendar_process_subscription_row`
|
|
|
7 |
- `calendar_import_icalendar_events`
|
|
|
8 |
- `fake_block_threemonths`
|
|
|
9 |
- `i_click_day_of_this_month_in_calendar`
|
|
|
10 |
- `i_hover_over_today_in_the_calendar`
|
|
|
11 |
* The following previously deprecated files have been removed and can no longer be used:
|
|
|
12 |
- `calendar_threemonth.js`
|
|
|
13 |
- `calendar_threemonth.mustache`
|
|
|
14 |
- `threemonth_month.mustache`
|
|
|
15 |
* The following have been deprecated:
|
|
|
16 |
- Behat step definition `i_hover_over_today_in_the_calendar`
|
|
|
17 |
* The event_exporter_base class now returns a field called "branded" indicating whether the module is branded or not.
|
|
|
18 |
All the external functions using the exporter will now return the new field:
|
|
|
19 |
- core_calendar_get_action_events_by_course
|
|
|
20 |
- core_calendar_get_action_events_by_courses
|
|
|
21 |
- core_calendar_get_action_events_by_timesort
|
|
|
22 |
- core_calendar_get_calendar_day_view
|
|
|
23 |
- core_calendar_get_calendar_event_by_id
|
|
|
24 |
- core_calendar_get_calendar_monthly_view
|
|
|
25 |
- core_calendar_get_calendar_upcoming_view
|
|
|
26 |
- core_calendar_submit_create_update_form
|
|
|
27 |
- core_calendar_update_event_start_day
|
|
|
28 |
|
|
|
29 |
=== 4.3 ===
|
|
|
30 |
* The `navigation` property has been removed from `\core_calendar\external\day_exporter` as it is not being used by any of the
|
|
|
31 |
calendar templates.
|
|
|
32 |
* The following functions have been deprecated and should no longer be used:
|
|
|
33 |
- calendar_top_controls()
|
|
|
34 |
- calendar_get_link_previous()
|
|
|
35 |
- calendar_get_link_next()
|
|
|
36 |
|
|
|
37 |
=== 4.1 ===
|
|
|
38 |
* New method `calendar_format_event_location` which will format the location property of an event, converting any
|
|
|
39 |
links into suitable markup
|
|
|
40 |
|
|
|
41 |
=== 4.0 ===
|
|
|
42 |
* The following external functions now accepts an optional parameter 'searchvalue' to search the events:
|
|
|
43 |
- core_calendar_external::get_calendar_action_events_by_timesort
|
|
|
44 |
- core_calendar_external::get_calendar_action_events_by_courses
|
|
|
45 |
- core_calendar_external::get_calendar_action_events_by_course
|
|
|
46 |
* Added core_calendar_delete_subscription, which allows to delete the calendar subscription.
|
|
|
47 |
* Updated calendar_can_manage_user_event() function to check permissions to user events.
|
|
|
48 |
* The following functions have been deprecated because they were no longer used:
|
|
|
49 |
- calendar_process_subscription_row()
|
|
|
50 |
- calendar_import_icalendar_events()
|
|
|
51 |
* The following has been removed after being deprecated in 3.8
|
|
|
52 |
* CALENDAR_EVENT_GLOBAL
|
|
|
53 |
* The following have been deprecated because the three-month pseudo block has been removed:
|
|
|
54 |
- fake_block_threemonths() renderer method.
|
|
|
55 |
- calendar_threemonth.js.
|
|
|
56 |
- calendar_threemonth and threemonth_month templates.
|
|
|
57 |
- Behat step definitions i_hover_over_day_of_this_month_in_calendar and i_click_day_of_this_month_in_calendar.
|
|
|
58 |
|
|
|
59 |
=== 3.10 ===
|
|
|
60 |
* The core_calendar\local\event\value_objects\times_interface class now has new method get_usermidnight_time() which
|
|
|
61 |
returns the user midnight time for a given event.
|
|
|
62 |
|
|
|
63 |
=== 3.9 ===
|
|
|
64 |
* Plugins can now create their own calendar events, both standard and action ones. To do it they need to specify
|
|
|
65 |
$event->component when creating an event. Component events can not be edited or deleted manually.
|
|
|
66 |
See https://moodledev.io/docs/apis/core/calendar#component-events
|
|
|
67 |
* The following functions have been deprecated because they were no longer used:
|
|
|
68 |
- calendar_add_event_metadata()
|
|
|
69 |
- core_calendar_renderer::event()
|
|
|
70 |
|
|
|
71 |
=== 3.8 ===
|
|
|
72 |
* The following functions have been finally deprecated and can not be used anymore:
|
|
|
73 |
* calendar_wday_name()
|
|
|
74 |
* calendar_get_block_upcoming()
|
|
|
75 |
* calendar_print_month_selector()
|
|
|
76 |
* calendar_cron()
|
|
|
77 |
* calendar_get_mini()
|
|
|
78 |
* calendar_get_upcoming()
|
|
|
79 |
* Added core_calendar_external::get_timestamps(), which allows an array containing an arbitrary number of arrays of
|
|
|
80 |
date/time data to be converted and returned as timestamps, along with an optional key.
|
|
|
81 |
|
|
|
82 |
=== 3.6 ===
|
|
|
83 |
* calendar_get_default_courses() function now has optional $userid parameter.
|
|
|
84 |
* calendar_set_filters() function now has optional $user parameter.
|
|
|
85 |
* The core_calendar\local\event\container class now provides two new helper methods for getting and setting the requesting user:
|
|
|
86 |
set_requesting_user() and get_requesting_user().
|
|
|
87 |
* The following functions have been finally deprecated and can not be used anymore:
|
|
|
88 |
* calendar_preferences_button()
|
|
|
89 |
* added core_calendar_get_valid_event_timestart_range callback for course events when the update_event_start_day function is used
|
|
|
90 |
in the local api.
|
|
|
91 |
|
|
|
92 |
=== 3.5 ===
|
|
|
93 |
* core_calendar_external::get_calendar_events now returns the categoryid for category events.
|
|
|
94 |
|
|
|
95 |
=== 3.4 ===
|
|
|
96 |
* calendar_get_mini, and calendar_get_upcoming have been deprecated. Please update to use the new exporters and renderers.
|
|
|
97 |
* added core_calendar_get_valid_event_timestart_range and core_calendar_event_timestart_updated callbacks for module events
|
|
|
98 |
when the update_event_start_day function is used in the local api.
|
|
|
99 |
|
|
|
100 |
=== 3.3 ===
|
|
|
101 |
* calendar_event_hook() has been removed. Developers should be using the Moodle events system to achieve this behaviour,
|
|
|
102 |
rather than using a hacky calendar specific implementation.
|
|
|
103 |
* calendar_wday_name() is deprecated and no longer used in core.
|
|
|
104 |
* calendar_get_block_upcoming() is deprecated, please use block_calendar_upcoming::get_upcoming_content() instead.
|
|
|
105 |
* calendar_print_month_selector() is deprecated and no longer used in core.
|
|
|
106 |
* calendar_cron() is deprecated and should not be used. Please use the core\task\calendar_cron_task instead.
|
|
|
107 |
|
|
|
108 |
=== 3.2 ===
|
|
|
109 |
* calendar_preferences_button() is now deprecated. Calendar preferences have been moved to the user preferences page.
|
|
|
110 |
|
|
|
111 |
=== 2.9 ===
|
|
|
112 |
default values changes in code:
|
|
|
113 |
* core_calendar_external::get_calendar_events_parameters() 'timeend' default option changed; now, by default,
|
|
|
114 |
all events are returned, not only the past ones.
|
|
|
115 |
* calendar types need to be updated to be compatible with standard PHP date/time code
|
|
|
116 |
|
|
|
117 |
=== 2.5 ===
|
|
|
118 |
required changes in code:
|
|
|
119 |
* calendar_add_icalendar_event() now requires a valid subscriptionid
|
|
|
120 |
* calendar_process_subscription_row() throws exception for invalid subscriptionid
|
|
|
121 |
* calendar_update_subscription_events() now throws a dml_exception instead of moodle_exception for bad subscriptions
|
|
|
122 |
* calendar_get_mini() function now has optional $placement and $courseid paramaters.
|
|
|
123 |
|
|
|
124 |
optional - no changes needed:
|
|
|
125 |
* calendar_update_subscription() should now be used to update Ical subscriptions.
|
|
|
126 |
|
|
|
127 |
=== 2.4 ===
|
|
|
128 |
|
|
|
129 |
required changes in code:
|
|
|
130 |
|
|
|
131 |
* calendar_get_popup() function now just returns id, instead of the string "id=$id"
|