95 Commits

Author SHA1 Message Date
Mark Nelson
5aac33c785 MDL-36941 core_message: dont query DB unnecessarily checking read status 2018-03-23 12:30:31 +08:00
Mark Nelson
74ad60bfbe MDL-36941 core_message: deprecated 'api::mark_all_read_for_user' 2018-03-23 12:30:30 +08:00
Mark Nelson
2b595d96f4 MDL-36941 core: added new mark notification as read webservice 2018-03-23 12:30:28 +08:00
Mark Nelson
548936a6c9 MDL-36941 core_message: mark notification/messages takes stdClass
This avoid unnecessary DB calls.
2018-03-23 12:30:27 +08:00
Mark Nelson
883ce42127 MDL-36941 core: convert existing api to use new table structure
Also deprecated the following functions -

1. message_move_userfrom_unread2read - It is not necessary
   for us to mark a message as read on user deletion.
2. message_get_blocked_users - Horrible logic used to
   determine if a user is blocked via reference on some
   randomly chosen 'isblocked' variable.
3. message_get_contacts - The same as above. This can be
   done in a much nicer way.
4. message_mark_message_read - We want two functions to do
   this to avoid confusing messages and notifications.
5. message_can_delete_message - This assumed the variable
   $message contained the 'useridto' property, which
   was present in the old table structure. We do not want
   future usages where a query is done on the new table
   and is simply passed as this won't contain this property.
6. message_delete_message - Same as above.
2018-03-23 12:30:27 +08:00
Juan Leyva
e71687baf9 MDL-60198 webservice: Add missing MOODLE_INTERNAL checks 2017-09-21 13:01:28 +02:00
Marina Glancy
6e65554ea1 MDL-58010 user: allow to update only whitelisted user preferences 2017-03-10 18:04:47 +00:00
David Monllao
ff8b71ef7b Merge branch 'MDL-56871_master' of git://github.com/markn86/moodle 2016-11-24 09:53:45 +08:00
Mark Nelson
cb8057531f MDL-56871 core_message: fix inconsistent online status between panels 2016-11-23 16:32:46 +08:00
Ankit Agarwal
7597ab0b99 MDL-56656 messages: Proper multilang formating in messaging pages 2016-11-22 14:51:12 +05:30
Andrew Nicols
d10ca75b8c Merge branch 'MDL-56407-master-2' of git://github.com/junpataleta/moodle 2016-11-22 09:06:09 +08:00
Jun Pataleta
26dca05d02 MDL-56407 message: Indicate user is blocked in message area 2016-11-17 09:11:37 +08:00
Mark Nelson
ffd7798c96 MDL-56139 core: changes after peer review
- No longer use the Fibonacci sequence for delaying the timeout.
  It is too aggressive.
- The backoff_timer AMD module now expects the callback AND the
  backoff function to be passed to the constructor.
- Added ability to specify polling frequency in config.php.
- Added helper function to return the cache key.
- Reworded the parameters for clarity.
2016-11-16 10:22:52 +08:00
Ryan Wyllie
fb1469d84f MDL-56139 message: ajax poll for new messages in message area 2016-11-16 10:22:33 +08:00
Simey Lameze
0b20349f32 MDL-56818 messages: remove duplicated messaging enabled check 2016-11-08 10:26:39 +08:00
David Monllao
5d0299e275 Merge branch 'MDL-56666-master' of git://github.com/jleyva/moodle 2016-11-03 10:28:59 +08:00
Juan Leyva
2521afd2e8 MDL-56666 message: New WS core_message_get_user_message_preferences 2016-11-02 12:16:23 +00:00
Simey Lameze
56fa3e011a MDL-56514 core_message: remove messaging enabled check 2016-11-01 14:15:32 +08:00
Dan Poltawski
e90d0c90b4 MDL-56514 message: fix whitespace 2016-10-31 10:06:26 +00:00
Simey Lameze
a2c7227ab8 MDL-56514 core_message: add missing is messaging enabled checks 2016-10-31 15:06:50 +08:00
Simey Lameze
343ba16c31 MDL-56501 message: introduce new manageallmessaging capability 2016-10-31 14:09:03 +08:00
Ryan Wyllie
cdff0944b6 MDL-56430 message: fix php7 incompatibility in processor form 2016-10-17 00:27:56 +00:00
David Monllao
1686d93a1c MDL-55393 message: Missing latest blocker issue code updates 2016-10-13 19:32:07 +02:00
Juan Leyva
e86f0cb4a1 MDL-55393 message: New WS get_user_notification_preferences 2016-10-13 19:32:06 +02:00
Ryan Wyllie
7d69958e6b MDL-56292 message: move popover code into output plugin 2016-10-11 14:39:23 +08:00
Ryan Wyllie
5cdebf2d7e MDL-56292 message: simplify get_popup_notifications function 2016-10-10 12:48:51 +08:00
Mark Nelson
cc22b515ea MDL-56333 core_message: fixed return type for get_profile WS 2016-10-10 12:48:51 +08:00
Mark Nelson
de55cb1b53 MDL-56089 core_message: modified API so it is not tied to renderables
Also did some minor refactoring/tidying of the code.
2016-10-07 16:37:56 +08:00
Mark Nelson
48e8bdba13 MDL-55942 core_message: renamed the term 'people' to 'user' 2016-10-07 16:37:56 +08:00
Mark Nelson
7b55aaa12e MDL-55942 core: obey the mighty CiBoT 2016-10-07 16:26:40 +08:00
Mark Nelson
79f6c36c12 MDL-55942 core_message: moved added functionality from message/lib.php 2016-10-07 16:26:40 +08:00
Mark Nelson
837941e9bc MDL-55909 core_message: added missing WS capability checks 2016-10-07 16:26:40 +08:00
Ryan Wyllie
0b19d04836 MDL-55812 message: simplify notification popover items 2016-10-07 16:26:40 +08:00
Mark Nelson
89a70ba1a5 MDL-55623 core_message: indicate who the message is from 2016-10-07 16:26:40 +08:00
Mark Nelson
94e1db613c MDL-55623 core_message: create helper function for WS to define messages 2016-10-07 16:26:40 +08:00
Mark Nelson
5bf0ff278a MDL-55811 core_message: ensure contact always shown 2016-10-07 16:26:40 +08:00
Mark Nelson
dd0c1403a1 MDL-55637 core_message: display icon for blocked users 2016-10-07 16:26:40 +08:00
Mark Nelson
a3e3a3a179 MDL-55637 core_message: create helper function for WS to define contacts 2016-10-07 16:26:40 +08:00
Mark Nelson
4d1b76ee36 MDL-55638 core_message: add message when there are no contacts 2016-10-07 16:26:40 +08:00
Ryan Wyllie
c33b7d8913 MDL-54701 message: add unread message count to messages 2016-10-07 16:26:40 +08:00
Ryan Wyllie
8c125526f1 MDL-54698 message: move notifications prefs into own page 2016-10-07 16:26:40 +08:00
Damyon Wiese
14968ca9ac MDL-55567 messages: Use FORMAT_MOODLE as default for sending messages
This is like plain text, but it preserves new-lines and has some
other special features.
2016-10-07 16:26:40 +08:00
Mark Nelson
bf58081d59 MDL-54687 core_message: return online status for messages and profile 2016-10-07 16:26:40 +08:00
Mark Nelson
cd03b8d7f2 MDL-54687 core_message: added search functionality 2016-10-07 16:26:40 +08:00
Mark Nelson
49aaadc3fb MDL-54687 core_message: corrected return type of webservices
Also minor tidy up of docs.
2016-10-07 16:26:40 +08:00
Mark Nelson
ef735275de MDL-54687 core_message: removed 'conversationsselected' variable 2016-10-07 16:26:40 +08:00
Ryan Wyllie
8c55bd6c34 MDL-54701 message: add message popover count and mark as read 2016-10-07 16:26:40 +08:00
Ryan Wyllie
24a76780f6 MDL-54708 message: add renderer for get_popup_notification 2016-10-07 16:26:40 +08:00
Mark Nelson
8ec78c48fa MDL-54687 core_message: added ajax scrolling for messages 2016-10-07 16:26:40 +08:00
Ryan Wyllie
ada7695d7c MDL-54708 message: notification popover respects message preferences 2016-10-07 16:26:40 +08:00