forked from moodle/moodle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupgrade.txt
211 lines (192 loc) · 10 KB
/
upgrade.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
This files describes API changes in /message/ messaging system,
information provided here is intended especially for developers.
=== 3.10 ===
* The following methods have been deprecated and should not be used any more:
* message_count_unread_messages()
* get_non_contacts_with_unread_message_count()
* get_contacts_with_unread_message_count()
* The following functions have been finally deprecated and can not be used anymore::
* search_users_in_course()
* search_users()
* get_contacts()
* get_messages()
* get_most_recent_message()
* get_profile()
* get_messages()
* create_messages()
* get_conversations_legacy_formatter()
* create_contacts()
* block_contacts()
* unblock_contacts()
* data_for_messagearea_search_users_in_course()
* data_for_messagearea_search_users()
* message_search_users()
* data_for_messagearea_conversations()
* data_for_messagearea_contacts()
* data_for_messagearea_messages()
* get_conversation_messages()
* data_for_messagearea_get_most_recent_message()
* data_for_messagearea_get_profile()
* mark_all_messages_as_read()
* delete_conversation()
=== 3.9 ===
* Removed the following deprecated functions:
- message_move_userfrom_unread2read
- message_get_blocked_users
- message_get_contacts
- message_mark_message_read
- message_can_delete_message
- message_delete_message
- mark_all_read_for_user()
* Message processors can implement the following methods which will be executed as part of the messaging cleanup task:
- cleanup_all_notifications
- cleanup_read_notifications
=== 3.8 ===
* The following methods have been deprecated and should not be used any more:
- \core_message\api::get_individual_conversations_between_users()
- \core_message\api::can_post_message()
=== 3.7 ===
* The message/index.php page used to support viewing another user's messages (if you had the right capabilities) by
altering the URL and adding the parameters 'user1' and 'user2'. There were only some very rare occurrences where you
could access a URL generated with these parameters (eg. log report). It was decided to stop supporting this
functionality and remove all the legacy code (see MDL-63915).
Note - It's still possible to view another user's messages if you have the right capabilities and are able to
'log-in as' them.
* A new parameter 'mergeself' has been added to the methods \core_message\api::get_conversations() and
core_message_external::get_conversations(), to decide whether the self-conversations should be included or not when the
private ones are requested, to display them together.
* A new 'customdata' field for both messages and notifications has been added. This new field can store any custom data
serialised using json_encode().
This new field can be used for storing any data not fitting in the current message structure. For example, it will be used
to store additional information for the "Mobile notifications" processor.
Existing external functions: core_message_get_messages and message_popup_get_popup_notifications has been udated to return the
new field.
* External function core_message_get_messages now returns the component and eventtype.
=== 3.6 ===
* The following functions have been finally deprecated and can not be used anymore:
* message_get_course_contexts()
* message_remove_url_params()
* message_count_messages()
* message_count_blocked_users()
* message_contact_link()
* message_history_link()
* message_shorten_message()
* message_get_fragment()
* message_get_contact_add_remove_link()
* message_get_contact_block_link()
* message_mark_messages_read()
* message_page_type_list()
* message_can_post_message()
* message_is_user_non_contact_blocked()
* message_is_user_blocked()
* The following functions have been deprecated and should not be used any more:
- message_add_contact()
- message_remove_contact()
- message_unblock_contact()
- message_block_contact()
- message_get_contact()
Please see their declaration in lib/deprecatedlib.php to view their alternatives (if applicable).
* The following methods have been deprecated and should not be used any more:
- \core_message\api::is_user_blocked()
- \core_message\api::delete_conversation()
- \core_message\api::is_user_non_contact_blocked()
- \core_message\api::create_conversation_between_users()
* The method \core_message\api::can_delete_conversation() now expects a 'conversationid' to be passed
as the second parameter.
* The following web services have been deprecated. Please do not call these any more.
- core_message_external::block_contacts(), please use core_message_external::block_user() instead.
- core_message_external::unblock_contacts(), please use core_message_external::unblock_user() instead.
- core_message_external::create_contacts(), please use core_message_external::create_contact_request() instead.
- core_message_external::delete_conversation(), please use core_message_external::delete_conversations_by_id() instead.
- core_message_external::core_message_mark_all_messages_as_read(), please use
core_message_external::core_message_mark_all_conversation_messages_as_read() instead.
- core_message_external::data_for_messagearea_conversations(), please use core_message_external::get_conversations()
instead
- core_message_external::data_for_messagearea_search_users_in_course().
- core_message_external::data_for_messagearea_search_users(),
please use core_message_external::message_search_users() instead.
- core_message_external::data_for_messagearea_contacts().
- core_message_external::data_for_messagearea_messages().
- core_message_external::data_for_messagearea_get_most_recent_message().
- core_message_external::data_for_messagearea_get_profile().
- core_message_external::get_contacts().
* The following function has been added for getting the privacy messaging preference:
- get_user_privacy_messaging_preference()
=== 3.5 ===
* Changed the database structure so there are no longer two tables for messages, with the only
difference being that one stores read messages. The 'message' and 'message_read' tables are
still present in core but will no longer be populated by core APIs. The data will be
transferred to the new database structure via an ad-hoc task. Please be patient. This can
take time.
The new database structure is as follows -
'messages' - Stores the messages with a 'useridfrom' field specifying the user who sent the
message and a 'conversationid' field specifying which conversation it is for.
'message_conversations' - The list of conversations.
'message_conversation_members' - The list of users in each conversation.
'message_user_actions' - The list of user actions against a message, eg. read/deleted.
'notifications' - This has a very similar structure to the old table 'message' and still
has a one-to-one relation between users.
Due to these huge differences the events message_sent, message_deleted and message_viewed
have changed quite a lot. Please, if you have any observers or are triggering these events
in your code you will have to make some changes!
* The webservice external function 'core_message_mark_message_read' now only marks messages as
read, and not notifications. A new external function 'core_message_mark_notification_read' was
added to mark notifications as read.
* Deprecated the following functions.
- message_move_userfrom_unread2read
- message_get_blocked_users
- message_get_contacts
- message_mark_message_read
- message_can_delete_message
- message_delete_message
- \core_message\api::mark_all_read_for_user
Please see their declaration in lib/deprecatedlib.php to view their alternatives (if applicable).
* Final deprecation of the following functions.
- message_get_recent_notifications
- message_search
- message_get_history
- message_get_recent_conversations
* Added new events for when a notification is sent and viewed.
* Removed the database table 'message_working'. The 'message_working' table was introduced when
the messaging system was first introduced in Moodle, so, a long time ago. It was never necessary.
* Replaced the usage of the table 'message_popup' to a new table 'message_popup_notifications'.
=== 3.2 ===
* Removed all message_print_* functions as well as the files search.html, search_advanced.html and
send_form.php due to messaging UI rehaul.
* Deprecated the following functions as they are no longer used.
- message_get_course_contexts
- message_remove_url_params
- message_count_messages
- message_count_blocked_users
- message_contact_link
- message_get_recent_notifications
- message_history_link
- message_search
- message_shorten_message
- message_get_fragment
- message_get_history
- message_get_contact_add_remove_link
- message_get_contact_block_link
- message_mark_messages_read
- message_page_type_list
- message_can_post_message
- message_is_user_non_contact_blocked
- message_is_user_blocked
=== 3.1 ===
* get_message_processors accepts an addition parameter for testing, which will just reset processor and exit.
* Deprecated method message_current_user_is_involved() has been removed.
=== 2.9 ===
* Renderer method \core_message_renderer::manage_messagingoptions now accepts a user id parameter as well.
=== 2.6 ===
* Message processor extending message_output, should return true in can_send_to_any_users()
if it supports message sending to internal (noreply/support) users.
* Message API has been changed to allow attachments. Message processors that can support
attachments can now use additional parameter as a part of $eventdata. To send attachments,
$eventdata should contain properties called "attachment" (must be stored_file) and
"attachname" (string). Currently, email message processor is the only one to support
attachments.
=== 2.2 ===
required changes:
* lib/messagelib.php message_send($eventdata)
$eventdata->userto should contain a property called "emailstop", $eventdata->userto->emailstop
If it is absent it will be retrieved from the user table causing an additional database query