Commit Graph

73 Commits

Author SHA1 Message Date
4060fcc662 MDL-65896 admin: add admin setting to show emoji picker
Added an admin setting to show/hide the emoji picker in messaging
because some versions of MySQL don't have full unicode support so
emojis won't save in the dabase.

If we detect that the site is running an unsupported version of MySQL
then the setting can not be enabled. Instead the admin will see a
message explaining that they will need to upgrade their database
before they can enable the emoji picker.
2019-10-23 10:59:59 +08:00
9f236d63e6 Merge branch 'MDL-65093_master-deprecate' of git://github.com/markn86/moodle 2019-07-29 10:43:52 +08:00
66fffdbce5 MDL-65093 core_message: dont show users with cap as blocked
It is possible that before this patch the user blocked a
teacher from messaging them, even though this would have
no effect. It is also possible for a user to block a user,
then that user gets 'promoted' to a teacher role and the
block becoming ineffective. In these cases we dont show the
user's status as blocked.
2019-07-29 10:39:57 +08:00
90403c5d9d MDL-65093 core_message: users can't block any user they want
If blocking will have no effect (ie. you are attempting to block
the admin) the 'Block' button will not be shown and instead a
message will be shown explaining why you can not block the user.
2019-07-29 10:39:57 +08:00
06d046c1ff MDL-65093 core_message: deprecate can_post_message() 2019-07-29 10:39:57 +08:00
6cb33ce774 MDL-65219 message: add message/pendingcontactrequests.php page back
We previously had this page when contact requests were first introduced
and unfortunately we created a bunch of notifications that reference
this URL directly which now won't work because the page has been removed.

I've added it back but set it to redirect to the message/index.php page
and load the contact requests page there.
2019-07-23 11:37:55 +08:00
8be24909bc MDL-65657 message: revert polling timeout back to old algorithm 2019-05-27 11:57:22 +08:00
3edac09063 MDL-65169 core_message: user search respects profile visibility
Two modes of visibility checking are supported, depending on the value
of the 'messagingallusers' site setting (site-wide messaging):
- If site-wide messaging is enabled, a user may only be returned in
search results if the searching user can view their profile somewhere
(either the site profile or any course profile).
- If site-wide messaging is disabled, a user may only be returned in
search results if the searching user shares a course with them and can
view their course profile in the shared course.
2019-04-30 11:25:46 +08:00
8c67db30a6 Merge branch 'MDL-64017_master' of git://github.com/markn86/moodle 2019-04-18 16:18:22 +08:00
d5d4a5aab2 MDL-64017 core_message: can specify conversation to view on index page 2019-04-18 14:28:09 +08:00
e16ab06b46 Merge branch 'MDL-64703-master' of git://github.com/bmbrands/moodle 2019-04-18 09:12:43 +08:00
7cbea16001 MDL-64703 core_message: 2 column message index page 2019-04-08 11:05:08 +02:00
3a5afbf5f1 MDL-65015 core_message: add trusttext cleaning to messaging 2019-04-07 10:56:53 +02:00
6408ea75ed MDL-64333 core_message: add migration message to new UI 2019-03-06 17:26:15 +08:00
6f9d34bd46 MDL-63915 core_message: 'message' link on profile opens drawer 2019-02-27 11:35:36 +08:00
fd998fc6f0 MDL-63915 core_message: add the UI to the message/index.php page 2019-02-27 11:35:36 +08:00
7ece4ca9da MDL-63915 core_message: mark items that can be removed in MDL-63261 2019-02-27 11:35:36 +08:00
fc2664501b MDL-64632 core_message: fixed PHP error when users are deleted from DB 2019-02-04 12:36:22 +08:00
9e6734a790 MDL-64412 core_message: get_member_info() respects provided ordering
This change makes sure the function returns the member information in
the same order as those users provided in the $userids param.
2019-01-02 15:21:06 +08:00
9b39f28214 MDL-64229 core_message: ensure profile pic links to profile 2018-12-13 12:01:06 +08:00
0847aa120c MDL-64057 core_message: return conversations with soft-deleted users
Individual conversations with a soft-deleted user (including messages)
are now displayed in the conversation listing. This brings the behaviour
of individual conversations in line with group conversations, in that
the active user can still view messages.
2018-11-23 11:02:20 +08:00
d2708759d8 MDL-64034 core_message: return conversationid in search_messages() 2018-11-19 10:23:15 +08:00
52beee65b2 MDL-63303 core_message: dont check online status for deleted users 2018-11-15 18:08:12 +08:00
0802c38a2f MDL-63303 message: add lastmessagedate to messagearea contact 2018-11-15 14:40:12 +08:00
38004e777f MDL-63303 message: fix get_member_info iscontact check 2018-11-15 14:40:12 +08:00
32b4212e50 MDL-63303 message: fix get_conversation_messages 2018-11-15 14:40:12 +08:00
49971e66f7 Merge branch 'MDL-63907-master' of git://github.com/cescobedo/moodle 2018-11-12 12:07:45 +01:00
75e6661940 Merge branch 'MDL-63909_master' of git://github.com/markn86/moodle 2018-11-12 14:01:01 +08:00
e2a8ebddb5 Merge branch 'MDL-63850_master' of git://github.com/markn86/moodle 2018-11-12 07:53:09 +08:00
d76029110b MDL-63884 core_message: fix for get_conversations legacy adapter code
This code also tries to adapt other conversation types, but it should
only support individual conversations, where we know members exist.
2018-11-09 17:59:55 +08:00
4461288dfa MDL-63909 core_message: undeprecated still used functions by old UI
A note has been made to remove these and other functions once we
remove the old UI.
2018-11-08 18:43:17 +08:00
cef1d977c3 MDL-63850 core_message: get_conversations returns privacy and requests 2018-11-08 16:24:29 +08:00
82e0973c96 MDL-63850 core_message: helper now returns privacy information 2018-11-08 16:05:25 +08:00
5c675c5076 MDL-63850 core_message: '$referenceuserid' used when returning requests 2018-11-08 16:05:25 +08:00
054834b00c MDL-63850 core_message: moved contact request logic to helper 2018-11-08 16:05:25 +08:00
6981de1080 MDL-63850 core_message: prevent exception being thrown with empty array 2018-11-08 16:05:25 +08:00
4cdc9f73b8 MDL-63907 core_message: Pass user object to show_online_status.
Fix create_contact() to pass user object as parameter in show_online_status.
2018-11-07 17:05:12 +01:00
74fc14e5b2 MDL-63898 core_message: fix for get_conversations message formatting
This used to return a text version of the message, but needs to return
the message formatted with message_format_message_text().
2018-11-07 14:23:54 +08:00
eb35e0b176 MDL-63549 core_message: deprecate data_for_messagearea_conversations 2018-10-31 10:55:34 +08:00
eb5865da8b MDL-63549 core_message: add group support to api::get_conversations
- Added support for returning group conversations
- Added support for conversation type filtering
- Added support for NO favourites, or ONLY favourites restrictions.
2018-10-31 08:16:31 +08:00
4699b8bc41 Revert "MDL-63466 core_message: removed get_last_message_time_created_cache_key"
This reverts commit 4f22d7f23b.
2018-10-26 14:53:58 +08:00
b95e4c786c MDL-63466 core_message: don't reorder messages when formatting
- Removed the reordering code from helper::get_conversation_messages()
- Added unit test confirming sort param behaviour for the
api::get_conversations_messages() method.
2018-10-26 12:26:23 +08:00
d1e8e69d85 MDL-63466 core_message: deprecated methods and services 2018-10-24 09:40:07 +08:00
4f22d7f23b MDL-63466 core_message: removed get_last_message_time_created_cache_key 2018-10-24 09:39:59 +08:00
fb04293bb1 MDL-63466 core_message: Add conversation support to get_messages
- The get_conversation_messages has been added to the API and the WS
with the conversation identifier (convid) instead of the userto,
to let get conversation messages and the members involved.
- The cache has been also reviewed, to use the convid instead of the
[userfrom, userto] keys.
- The get_most_recent_conversation_messages has been added to the API
to update the cache when needed.
2018-10-24 09:39:05 +08:00
d89d0d6593 MDL-63466 core_message: Added format_conversation_messages helper
The format_conversation_messages function has been added. It returns
the messages and the array of users who have sent any of these
messages.
2018-10-24 09:38:10 +08:00
2a2b86f123 MDL-63466 core_message: add helper method for fetching member info
The aim is to use this to standardise the member information we return
from several methods in the API, such as get_conversations,
get_conversation_messages, get_conversation_members, and in search
methods.
2018-10-24 09:23:30 +08:00
78348dfc4e MDL-61255 core_message: added helper function to detect legacy messages 2018-04-10 17:28:52 +08:00
e159b53b5b MDL-36941 core_message: improved performance of helper::get_messages()
Improved the query to use the 'convhash' field as well as adding an index.

Also fixed issue where 'timeread' was hardcoded as 0.
2018-03-23 12:30:30 +08:00
b2cd17e6a9 MDL-36941 core: added 'convhash' field to quickly get conversations 2018-03-23 12:30:28 +08:00