Commit Graph

84 Commits

Author SHA1 Message Date
Mihail Geshoski
ee2d1f806d MDL-75513 message: Enable optional text display in the contact toggle 2022-11-02 17:45:52 +08:00
Neill Magill
6fb4a3b56e MDL-72948 messaging: Minimise fields used in query
Most of the fields in the query are not needed and are discarded
soon after visibility checks are made.
2022-06-22 10:11:18 +01:00
Frédéric Massart
bee1bb317e MDL-74169 core_message: Hide preferences link when permissions lacking 2022-03-21 18:37:45 +08:00
Pau Ferrer Ocaña
d74bd798b6 MDL-67853 message: Remove on/offline settings on message preferences 2022-01-27 15:22:15 +01:00
David Mudrák
f9ee118e94 MDL-72325 user: Use the core_user::awaiting_action() in existing places
There were existing places each doing its own checks similar to the ones
covered by the newly added core_user::awaiting_action() method. This
patch replaces those custom checks with this new API call.
2021-08-12 13:05:38 +02:00
cescobedo
7a6d65eedb MDL-72139 core_message: Fix encoding UTF-8 in prevent unclosed tags 2021-07-14 07:41:00 +02:00
cescobedo
9aa5f7fe9b MDL-71919 core_message: Fix unclosed html tags in email notification 2021-07-08 23:30:35 +02:00
sam marshall
5e72715e4f MDL-71099 Lib: Move new user_fields class from core to core_user
This class would belong more appropriately within the 'user' API
(core_user) instead of within the 'core' API, since it is
directly related to user data.

Since the class has only just been added to Moodle, now is a good
time to move it.
2021-03-25 13:47:23 +00:00
sam marshall
558cc1b85e MDL-45242 Lib: Replace calls to deprecated functions
In all cases changes have been kept to a minimum while not making
the code completely horrible. For example, there are many instances
where it would probably be better to rewrite a query entirely, but
I have not done that (in order to reduce the risk of changes).
2021-03-10 10:57:10 +00:00
Ferran Recio
ce87be7db6 MDL-67782 message: fix messages max length 2021-01-12 17:14:33 +01:00
Mathew May
ee94aded30 MDL-63261 messaging: Final 3.6 deprecations 2020-09-07 09:10:46 +08:00
Ryan Wyllie
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
Adrian Greeve
9f236d63e6 Merge branch 'MDL-65093_master-deprecate' of git://github.com/markn86/moodle 2019-07-29 10:43:52 +08:00
Mark Nelson
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
Mark Nelson
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
Mark Nelson
06d046c1ff MDL-65093 core_message: deprecate can_post_message() 2019-07-29 10:39:57 +08:00
Ryan Wyllie
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
Ryan Wyllie
8be24909bc MDL-65657 message: revert polling timeout back to old algorithm 2019-05-27 11:57:22 +08:00
Jake Dallimore
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
Adrian Greeve
8c67db30a6 Merge branch 'MDL-64017_master' of git://github.com/markn86/moodle 2019-04-18 16:18:22 +08:00
Mark Nelson
d5d4a5aab2 MDL-64017 core_message: can specify conversation to view on index page 2019-04-18 14:28:09 +08:00
Adrian Greeve
e16ab06b46 Merge branch 'MDL-64703-master' of git://github.com/bmbrands/moodle 2019-04-18 09:12:43 +08:00
Bas Brands
7cbea16001 MDL-64703 core_message: 2 column message index page 2019-04-08 11:05:08 +02:00
cescobedo
3a5afbf5f1 MDL-65015 core_message: add trusttext cleaning to messaging 2019-04-07 10:56:53 +02:00
Mark Nelson
6408ea75ed MDL-64333 core_message: add migration message to new UI 2019-03-06 17:26:15 +08:00
Mark Nelson
6f9d34bd46 MDL-63915 core_message: 'message' link on profile opens drawer 2019-02-27 11:35:36 +08:00
Mark Nelson
fd998fc6f0 MDL-63915 core_message: add the UI to the message/index.php page 2019-02-27 11:35:36 +08:00
Mark Nelson
7ece4ca9da MDL-63915 core_message: mark items that can be removed in MDL-63261 2019-02-27 11:35:36 +08:00
Mark Nelson
fc2664501b MDL-64632 core_message: fixed PHP error when users are deleted from DB 2019-02-04 12:36:22 +08:00
Jake Dallimore
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
Mark Nelson
9b39f28214 MDL-64229 core_message: ensure profile pic links to profile 2018-12-13 12:01:06 +08:00
Jake Dallimore
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
Jake Dallimore
d2708759d8 MDL-64034 core_message: return conversationid in search_messages() 2018-11-19 10:23:15 +08:00
Mark Nelson
52beee65b2 MDL-63303 core_message: dont check online status for deleted users 2018-11-15 18:08:12 +08:00
Ryan Wyllie
0802c38a2f MDL-63303 message: add lastmessagedate to messagearea contact 2018-11-15 14:40:12 +08:00
Ryan Wyllie
38004e777f MDL-63303 message: fix get_member_info iscontact check 2018-11-15 14:40:12 +08:00
Ryan Wyllie
32b4212e50 MDL-63303 message: fix get_conversation_messages 2018-11-15 14:40:12 +08:00
Eloy Lafuente (stronk7)
49971e66f7 Merge branch 'MDL-63907-master' of git://github.com/cescobedo/moodle 2018-11-12 12:07:45 +01:00
Damyon Wiese
75e6661940 Merge branch 'MDL-63909_master' of git://github.com/markn86/moodle 2018-11-12 14:01:01 +08:00
Andrew Nicols
e2a8ebddb5 Merge branch 'MDL-63850_master' of git://github.com/markn86/moodle 2018-11-12 07:53:09 +08:00
Jake Dallimore
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
Mark Nelson
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
Mark Nelson
cef1d977c3 MDL-63850 core_message: get_conversations returns privacy and requests 2018-11-08 16:24:29 +08:00
Mark Nelson
82e0973c96 MDL-63850 core_message: helper now returns privacy information 2018-11-08 16:05:25 +08:00
Mark Nelson
5c675c5076 MDL-63850 core_message: '$referenceuserid' used when returning requests 2018-11-08 16:05:25 +08:00
Mark Nelson
054834b00c MDL-63850 core_message: moved contact request logic to helper 2018-11-08 16:05:25 +08:00
Mark Nelson
6981de1080 MDL-63850 core_message: prevent exception being thrown with empty array 2018-11-08 16:05:25 +08:00
cescobedo
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
Jake Dallimore
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
Jake Dallimore
eb35e0b176 MDL-63549 core_message: deprecate data_for_messagearea_conversations 2018-10-31 10:55:34 +08:00