Commit e4c30994 authored by Mark Nelson's avatar Mark Nelson
Browse files

MDL-63548 core_message: deprecated mark_all_messages_as_read web service

parent cc486e61
......@@ -1059,7 +1059,8 @@ $functions = array(
'classname' => 'core_message_external',
'methodname' => 'mark_all_messages_as_read',
'classpath' => 'message/externallib.php',
'description' => 'Mark all messages as read for a given user',
'description' => '** DEPRECATED ** Please do not call this function any more.
Mark all messages as read for a given user',
'type' => 'write',
'ajax' => true,
'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
......
......@@ -2414,6 +2414,7 @@ class core_message_external extends external_api {
/**
* Mark all messages as read parameters description.
*
* @deprecated since 3.6
* @return external_function_parameters
* @since 3.2
*/
......@@ -2429,14 +2430,15 @@ class core_message_external extends external_api {
}
/**
* Mark all notifications as read function.
* Mark all messages as read function.
*
* @since 3.2
* @deprecated since 3.6
* @throws invalid_parameter_exception
* @throws moodle_exception
* @param int $useridto the user id who received the message
* @param int $useridfrom the user id who send the message. -10 or -20 for no-reply or support user
* @return external_description
* @since 3.2
*/
public static function mark_all_messages_as_read($useridto, $useridfrom) {
global $USER, $CFG;
......@@ -2492,8 +2494,9 @@ class core_message_external extends external_api {
}
/**
* Mark all notifications as read return description.
* Mark all messages as read return description.
*
* @deprecated since 3.6
* @return external_single_structure
* @since 3.2
*/
......@@ -2501,6 +2504,15 @@ class core_message_external extends external_api {
return new external_value(PARAM_BOOL, 'True if the messages were marked read, false otherwise');
}
/**
* Marking the method as deprecated.
*
* @return bool
*/
public static function mark_all_messages_as_read_is_deprecated() {
return true;
}
/**
* Returns description of method parameters.
*
......
......@@ -36,6 +36,8 @@ information provided here is intended especially for developers.
- 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.
* The following function has been added for getting the privacy messaging preference:
- get_user_privacy_messaging_preference()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment