Commit graph

1793 commits

Author SHA1 Message Date
Jake Dallimore
e4088b7582 MDL-64047 core_message: test get_contact_requests() with blocked users 2018-11-27 08:55:35 +08:00
Jake Dallimore
e492a5540d MDL-64047 core_message: contact request count must exclude blocked users 2018-11-27 08:46:25 +08:00
Ryan Wyllie
3528c86c12 MDL-64139 message: load conversation counts async 2018-11-26 14:36:35 +08:00
Jake Dallimore
36fabf72c0 MDL-64140 core_message: test unread counts with dataprovider in api
The 3 methods used to test this function are superceded by the cases in
the dataprovider, so let's remove these and use the provider instead.
2018-11-26 10:54:29 +08:00
Jake Dallimore
b402a163e3 MDL-64140 core_message: add get_unread_conversation_counts() web service 2018-11-26 10:54:18 +08:00
Jake Dallimore
7f6f45c460 MDL-64167 core_message: fix counts to exclude 'self' conversations 2018-11-26 08:52:55 +08:00
Jake Dallimore
425f5adcca MDL-64167 core_message: get_conversations() excludes self conversations
The UI can't handle these, so for now, let's not return them.
2018-11-26 08:52:55 +08:00
Jake Dallimore
cb38961988 MDL-64167 core_message: get_conversations() handles self conversations
Those individual conversations created with one's self (via admin user
bulk actions) are now supported in get_conversations(). These had two
records with the same userid in the message_conversation_members table.
The following adjustments have been made to accomodate these:
- Member count adjusted to read 1, not 2 for 'self' conversations.
- Member information for the current user now returned for 'self'
conversations.
- The method now tracks 'self' conversations via $selfconversations.
2018-11-26 08:52:54 +08:00
Jun Pataleta
beb7083381 Merge branch 'MDL-64057-master' of https://github.com/snake/moodle 2018-11-23 14:47:00 +08:00
Jake Dallimore
c296c48f66 MDL-64057 core_message: fix bug with favourite count aggregation 2018-11-23 14:42:33 +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
7d678923b3 MDL-64180 core_message: added new WS for contact request count 2018-11-23 11:34:55 +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
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
b694b9b8e2 MDL-64057 core_message: use get_conversation_counts() during rendering 2018-11-23 11:02:20 +08:00
Jake Dallimore
28ff6ad1da MDL-64057 core_message: add get_conversation_counts() web service 2018-11-23 11:02:20 +08:00
Jake Dallimore
8e91aaabc9 MDL-64057 core_message: consolidate conversation counts into single call
Counts for types (individual, group) and favourites can be fetched with
a single API call.
2018-11-23 11:02:19 +08:00
Andrew Nicols
90015eff82 Merge branch 'MDL-64165_master' of git://github.com/markn86/moodle 2018-11-22 15:40:41 +08:00
Mark Nelson
2be9a4aecb MDL-64165 core_message: fixed contact requests web service structure 2018-11-22 14:51:59 +08:00
Mark Nelson
34b940f682 MDL-64165 core_message: removed unused params from WS helper method 2018-11-22 14:47:05 +08:00
Andrew Nicols
c746921e6e Merge branch 'MDL-64018_master' of git://github.com/markn86/moodle 2018-11-22 11:03:58 +08:00
Andrew Nicols
77295b2922 Merge branch 'MDL-64136-master' of git://github.com/ryanwyllie/moodle 2018-11-21 14:48:31 +08:00
Ryan Wyllie
070d4819b2 MDL-64136 message: remove unused message_drawer_view_contacts_section.js 2018-11-21 14:11:29 +08:00
Andrew Nicols
1d163100ec Merge branch 'MDL-64128-master' of git://github.com/ryanwyllie/moodle 2018-11-21 14:04:27 +08:00
Ryan Wyllie
6adee4a7b5 MDL-64128 message: fix exception when declining contact request 2018-11-21 11:45:24 +08:00
Mark Nelson
00e103a7b4 MDL-64018 core_message: use new web service in UI 2018-11-21 11:09:55 +08:00
Mark Nelson
c9b0f33f78 MDL-64018 core_message: added external::get_user_contacts
This is to replace usages of external::data_for_messagearea_contacts
in the new UI.
2018-11-21 11:09:55 +08:00
Mark Nelson
715c45aac9 MDL-64018 core_message: added api::get_user_contacts
This is to replace api::get_contacts when that gets deprecated.
2018-11-21 11:09:11 +08:00
Mark Nelson
f89055372e MDL-64018 core_message: deprecated get_contacts web service 2018-11-21 11:09:11 +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
f83041790a Merge branch 'MDL-64045-master' of git://github.com/ryanwyllie/moodle 2018-11-21 09:58:50 +08:00
Ryan Wyllie
b263491138 MDL-64045 message: stop favouriting null conversations
Don't show the controls to favourite a conversation until one has been
created.
2018-11-21 08:57:34 +08:00
Jun Pataleta
918776482a MDL-63692 message: Set canonicalize to true for array comparison 2018-11-20 14:41:40 +08:00
Andrew Nicols
43f6899289 MDL-63692 message: Correct favourite fetch 2018-11-20 14:40:39 +08:00
Andrew Nicols
ffd303146f MDL-63692 message: Fix unit test assumption
Contact requests do not cause notifications.
2018-11-20 14:40:39 +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
Andrew Nicols
04e83dcf10 Merge branch 'MDL-64058-master' of https://github.com/snake/moodle 2018-11-20 10:22:41 +08:00
Andrew Nicols
2f7076ebf2 MDL-63692 message: Resolve bad merge conflict 2018-11-20 09:04:53 +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
Andrew Nicols
08cd15658a Merge branch 'MDL-63692-master' of git://github.com/sarjona/moodle 2018-11-20 07:51:40 +08:00
Sara Arjona
16913e60b3 MDL-63692 core_message: Add favourite conversations to Privacy API 2018-11-19 22:09:13 +01:00
Sara Arjona
6b036d04cf MDL-63692 core_message: Fix the context for favourite conversations
The converation favourites were previously set in the system context
which is not right, as they should be stored:
- In the conversation context when defined.
- In the user context, when contextid is null (that means is an
individual conversation).
2018-11-19 22:08:28 +01:00
Sara Arjona
201cebeae5 MDL-63692 core_message: Add conversation support to Privacy API 2018-11-19 22:08:22 +01:00
David Monllao
892356acaa MDL-64060 message: Replace error code by language str 2018-11-19 11:18:39 +01:00
David Monllao
a6c4e6f0a6 Merge branch 'MDL-64060-master' of git://github.com/jleyva/moodle 2018-11-19 11:16:09 +01:00
Andrew Nicols
90a4438139 Merge branch 'MDL-64035-master' of https://github.com/snake/moodle 2018-11-19 15:08:22 +08:00
Andrew Nicols
237786f159 Merge branch 'MDL-63913-master' of https://github.com/snake/moodle 2018-11-19 14:59:39 +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