352 Commits

Author SHA1 Message Date
Paul Holden
092273751b
MDL-78792 message: access checks in processor fragment callback. 2023-08-10 18:31:50 +07:00
Paul Holden
0e742a2fc9 MDL-69643 message: final removal of deprecated 310 methods. 2023-01-06 09:28:40 +00:00
Pau Ferrer Ocaña
d74bd798b6 MDL-67853 message: Remove on/offline settings on message preferences 2022-01-27 15:22:15 +01:00
Dani Palou
244aade1d6 MDL-72587 message: Support getting both read and unread messages 2021-09-28 10:37:39 +02:00
Paul Holden
bf97f707cd MDL-67338 message: re-implement block page type patterns.
The `page_type_list` method for the message component was deprecated
in 5b0769db as part of MDL-54744. However it is still required when
trying to configure blocks on any messaging pages.
2021-07-14 19:34:13 +01: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
David Mudrák
801ee23427 MDL-69050 lang: Improve the wording of the comments
Stop using the terms whitelist/blacklist when used to allow/deny things.
2020-09-24 19:41:58 +02:00
Mathew May
ee94aded30 MDL-63261 messaging: Final 3.6 deprecations 2020-09-07 09:10:46 +08:00
Bas Brands
77e5b4462e MDL-67577 core_message: navbar_output order
* moved the logic from core_message_popup_render_navbar_output to
message_popup_render_navbar_output in message/output/popup/lib.php

* using float: left instead of float: right in theme
2020-01-27 12:14:16 +01:00
Juan Leyva
dcadc8c54c MDL-65968 notifications: Use f1 size avatars for Push notifications 2019-09-17 16:29:02 +02:00
Tim Schroeder
c07e039c84
MDL-65510 messages: fixed defines not being used in code 2019-05-28 13:46:23 +02:00
Juan Leyva
2356454f21 MDL-60680 notifications: Include action buttons information 2019-04-25 14:55:57 +02:00
Juan Leyva
36fa0ec900 MDL-60680 notifications: Return custom data in notifications 2019-04-25 14:55:18 +02:00
cescobedo
3a5afbf5f1 MDL-65015 core_message: add trusttext cleaning to messaging 2019-04-07 10:56:53 +02: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
Adrian Greeve
df4a17c7ed Merge branch 'MDL-64093_master' of git://github.com/markn86/moodle 2019-02-21 09:46:54 +01:00
cescobedo
e84312f768 MDL-64571 core_message: Fix duplicate footer in msg notification email 2019-02-12 00:43:21 +01:00
Mark Nelson
46014b8343 MDL-64093 core: added new 'messagingdefaultpressenter' setting 2019-02-11 09:47:40 +08:00
Mark Nelson
4cec9fca96 MDL-64566 core_message: removed unnecessary DB call 2019-01-14 09:45:38 +08:00
Ryan Wyllie
3528c86c12 MDL-64139 message: load conversation counts async 2018-11-26 14:36:35 +08:00
Damyon Wiese
35889e23b7 Merge branch 'MDL-64180_master' of git://github.com/markn86/moodle 2018-11-23 12:21:13 +08:00
Mark Nelson
720cc99331 MDL-64180 core_message: change stdClass to int for count requests param
This will be used by a new web service and we do not want to fetch
the user unnecessarily in the call.

Also renamed the method for consistency.
2018-11-23 11:34:40 +08:00
Jun Pataleta
252f0e16ea Merge branch 'MDL-64057-master' of https://github.com/snake/moodle 2018-11-23 11:24:58 +08:00
Jake Dallimore
b694b9b8e2 MDL-64057 core_message: use get_conversation_counts() during rendering 2018-11-23 11:02:20 +08:00
Damyon Wiese
730284fc16 Merge branch 'MDL-64054-master' of git://github.com/ryanwyllie/moodle 2018-11-21 10:07:42 +08:00
Andrew Nicols
b20a6a4af6 Merge branch 'MDL-64024-master' of git://github.com/snake/moodle 2018-11-20 12:26:09 +08:00
Sara Arjona
4f97ea8856 MDL-64024 message: Fix lib::get_messages to get only individual messages
From 3.6 users can have also group conversations, so it's needed to review
the messages_get_messages function to make sure only returns the
individual messages between 2 users.
2018-11-20 10:44:27 +08:00
Jake Dallimore
4283291889 MDL-64058 core_message: fix logic driving conversation section expansion
Unread conversations should be given priority over read. If one or more
sections have unread conversations, prioritise favourites over group and
group over individual. The same applies if all conversations are read.
2018-11-20 08:56:37 +08:00
Ryan Wyllie
08ae9a7362 MDL-64054 message: add all processors to message settings
Changed the settings page in the message drawer to display all message
notification processors (e.g. email, mobile, jabber) for the user to
configure based on which processors are enabled on the site.
2018-11-19 14:53:38 +08:00
Jake Dallimore
da714be155 MDL-64058 core_message: add unread counts to the conversations view 2018-11-19 13:55:18 +08:00
Ryan Wyllie
d3d95d5dc2 MDL-63303 message: fix bugs in message drawer part 4
* Add clarification to delete messages lang strings
* Stop message polling when sending a message to fix UI bug
* Publish update last message event when polling finds more messages
* Remove logged in user from group conversation participants list
* Use user object to fetch user preferences to reduce DB calls
* Remove animated slide transitions because the browser breaks when
  showing some conversations
2018-11-16 14:10:10 +08:00
Ryan Wyllie
c75559cfff MDL-63303 message: move message drawer to end of <body>
Fix some of the behat tests that are looking for generic button
names that match some of the buttons in the message drawer which
happen to appear earlier in the DOM.
2018-11-15 14:43:22 +08:00
Ryan Wyllie
a111ab44af MDL-63303 message: fix bugs in message drawer part 2
* Added missing icon mappings for font-awesome
* Fixed focus on dialogue button when it opens
* Fixed UI updates on user block / unblock
* Fix jQuery syntax error when sending message with quotes
* Fix message/index.php opening drawer when no conversation found
* Fix placeholders rendered for new requests
2018-11-15 14:43:21 +08:00
Ryan Wyllie
1d3535f95c MDL-63303 message: fix bugs in message drawer
* Fix navigation from view_contact to view_conversation on an action
  such as blocking
* Fix default open message section on overview page depending on which
  section has conversations
* Fix message/index.php for users who haven't yet started a
  conversation
2018-11-15 14:43:21 +08:00
Ryan Wyllie
8c8939c1ae MDL-63303 message: add enter to send user preference 2018-11-15 14:43:21 +08:00
Ryan Wyllie
1e3453b7c7 MDL-63303 message: change nav popover to toggle message drawer 2018-11-15 14:43:21 +08:00
Ryan Wyllie
5005d8cfb4 MDL-63303 message: add message drawer (boost only) 2018-11-15 14:43:21 +08:00
Sara Arjona
f7dfa9ba3e MDL-63214 message: Add privacy preferences to filter who can message
Add new messaging profile preferences to allow users to choose who
can message them:
- By default, users can select between 'My contacts only' and 'My
contacts and anyone in my courses'
- When $CFG->messagingallusers is enabled, a new option is displayed
also: 'Anyone on the site'. For users who have selected this option,
if $CFG->messagingallusers is disabled, the behaviour will be changed
to 'My contacts and anyone in my courses'
2018-10-17 11:52:57 +02:00
Mark Nelson
f219eac7b4 MDL-63211 core: update core to use new APIs 2018-10-03 11:51:29 +08:00
Mark Nelson
0b3eadcd96 MDL-63211 core_message: deprecated functions and added new API 2018-10-03 11:35:26 +08:00
Pavel Sokolov
f88cc4ccae MDL-63130 message: message_count_unread_message counts sent messages 2018-09-06 18:16:06 +08:00
Adrian Greeve
5454e72c21 MDL-55188 events: First deprecation of eventslib.php 2018-07-30 09:23:54 +08:00
Mark Nelson
c57fadcc64 MDL-62808 core_message: fixed 'useridto' being incorrectly set to 0 2018-07-09 12:00:06 +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
Marina Glancy
6e65554ea1 MDL-58010 user: allow to update only whitelisted user preferences 2017-03-10 18:04:47 +00:00
Mark Nelson
29c3b0b4d2 MDL-58014 core_message: fixed unread message count 2017-02-20 13:29:13 +08:00
Ryan Wyllie
b1e6f1a8fb MDL-57370 message: deprecate message_get_recent_conversations 2017-02-07 01:40:47 +00:00
Mark Nelson
af5765b3fb MDL-56139 core_message: removed unused constants 2016-11-16 10:22:52 +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