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