Commit graph

1419 commits

Author SHA1 Message Date
Andrew Nicols
67b813514c Merge branch 'MDL-63408_master' of git://github.com/markn86/moodle 2018-10-23 08:50:40 +08:00
David Monllao
f7642bebc5 Merge branch 'MDL-62560-master' 2018-10-22 12:52:58 +02:00
Mihail Geshoski
325d9b50e2 MDL-63615 message_airnotifier: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:50:10 +02:00
Mihail Geshoski
99ed2697bd MDL-63616 message_email: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:50:09 +02:00
Mihail Geshoski
cb5ba9b873 MDL-63617 message_jabber: Add support for removal of context users
This issue is part of the MDL-62560 Epic.
2018-10-22 12:50:09 +02:00
Andrew Nicols
9c6ccfd93b Merge branch 'MDL-63213-master-2' of https://github.com/snake/moodle 2018-10-22 10:54:56 +08:00
Andrew Nicols
7b73fd183c Merge branch 'MDL-63691_master' of git://github.com/markn86/moodle 2018-10-22 10:52:13 +08:00
Mark Nelson
d9a25f397d MDL-63408 core_message: removed usage of deprecated method in tests
Also, added tests to ensure exception is thrown if you try to
add or remove members to/from an individual conversation.
2018-10-22 10:26:37 +08:00
Mark Nelson
cbf9e41c2d MDL-63408 core_message: remove no longer needed code
We only allow the functionality of adding/removing
members on group conversations, which will never have
a conversation hash.
2018-10-22 10:26:30 +08:00
Mark Nelson
83e3a4fe26 MDL-63408 core_message: add check to ensure it is a group conversation 2018-10-22 10:26:21 +08:00
Amaia Anabitarte
623048af81 MDL-63408 core_message: New functions to manage conversation members
New functions created to add, remove and count conversation members
2018-10-22 10:26:10 +08:00
Mark Nelson
f2ac0a3e5b MDL-63691 core_message: added api::create_conversation 2018-10-22 10:21:28 +08:00
Mark Nelson
e66b915c40 MDL-63691 core_message: added api::can_create_group_conversation 2018-10-22 10:21:27 +08:00
Mark Nelson
a66ae84911 MDL-63691 core_message: deprecate create_conversation_between_users 2018-10-22 10:21:27 +08:00
Jake Dallimore
5b367baef8 MDL-63213 core_message: add web services for set/unset favourites 2018-10-22 09:56:06 +08:00
Jake Dallimore
b8ff2c4481 MDL-63213 core_message: update get_conversations to support favourites
Added the type param here, which will be used in MDL-63549.
2018-10-22 09:43:33 +08:00
Andrew Nicols
c3918bfee9 MDL-63289 message: Remove unused global 2018-10-22 08:31:04 +08:00
Sara Arjona
e5eba802d5 MDL-63289 message: Deprecate is_user_non_contact_blocked method
This function has been deprecated and no other function has been
added to replace it. It was only called from can_post_message, so
its code has been moved there.
2018-10-20 08:36:24 +02:00
Sara Arjona
7983fb830e MDL-63289 message: Bypass privacy user preferences for teachers
Created capability 'moodle/site:messageanyuser' to allow
bypass user privacy preferences for messaging participants in a course,
even when some of them has blocked the teacher.
2018-10-20 08:35:17 +02:00
David Monllao
32b01d2b02 Merge branch 'MDL-63214-master' of git://github.com/sarjona/moodle 2018-10-17 15:55:44 +02: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
60b67bbcf7 MDL-63547 core_message: web service can delete multiple conversations 2018-10-17 12:05:16 +08:00
Mark Nelson
26f39c8861 MDL-63547 core_message: added delete_conversation_by_id web service 2018-10-17 12:05:16 +08:00
Mark Nelson
fa024820f2 MDL-63547 core_message: deprecate delete_conversation web service 2018-10-17 12:05:16 +08:00
Mark Nelson
15663b0bec MDL-63547 core_message: can_delete_conversation expects a conversationid 2018-10-17 12:05:16 +08:00
Mark Nelson
263ad98436 MDL-63547 core_message: deprecated api::delete_conversation() 2018-10-17 12:05:16 +08:00
Mark Nelson
08cb8a34f9 MDL-63547 core_message: updated api::can_delete_message 2018-10-17 12:05:16 +08:00
Mark Nelson
14de10c463 MDL-63547 core_message: updated message_deleted event to support groups 2018-10-17 12:05:16 +08:00
Peter Spicer
9eac857649 MDL-63451 core_message: Properly escape URLs for notification popup 2018-10-10 13:05:05 +01:00
Eloy Lafuente (stronk7)
609c73be26 Merge branch 'MDL-29895' of https://github.com/enovation/moodle 2018-10-10 00:29:16 +02:00
Mark Nelson
0d203bbf8d MDL-63211 core_message: respect new setting 'messagingallusers' 2018-10-03 11:58:39 +08:00
Mark Nelson
c886e2c94d MDL-63211 core_message: deprecated api::is_user_blocked 2018-10-03 11:58:39 +08:00
Damyon Wiese
b8dad795f7 MDL-63211 message: update behat
Approve the contact requests in the behat test.
2018-10-03 11:58:39 +08:00
Mark Nelson
be016b0144 MDL-63211 core: added notification when contact request is made 2018-10-03 11:58:39 +08:00
Mark Nelson
892aad5185 MDL-63211 core_message: add temporary pending contact requests page 2018-10-03 11:51:29 +08:00
Mark Nelson
f219eac7b4 MDL-63211 core: update core to use new APIs 2018-10-03 11:51:29 +08:00
Mark Nelson
beeadbf783 MDL-63211 core: updated upgrade.txt files 2018-10-03 11:51:29 +08:00
Mark Nelson
742c27b3e8 MDL-63211 core_message: updated privacy provider 2018-10-03 11:51:29 +08:00
Mark Nelson
522841861f MDL-63211 core_message: added new web services 2018-10-03 11:35:26 +08:00
Mark Nelson
0b3eadcd96 MDL-63211 core_message: deprecated functions and added new API 2018-10-03 11:35:26 +08:00
Andrew Nicols
20f9b981f9 Merge branch 'dashboard-split-overview-block' of https://github.com/ryanwyllie/moodle 2018-09-27 14:08:55 +08:00
Ryan Wyllie
bbe6eadda7 MDL-63044 block_myoverview: remove tab preference 2018-09-27 13:10:45 +08:00
Jonathan Champ
b2f349a433 MDL-54035 accesslib: separate role definition cache clear
Thanks to MDL-49398, we can separate the combined user session and role
definition cache clearing function into two separate functions. At the
same time, we want to identify and remove mark_dirty() calls that were
added for role definition changes but were incorrectly left behind.

Change highlights:
 - Remove unnecessary mark_dirty() calls performed after
   assign_capability(), unassign_capability(), delete_role(),
   deleted contexts, brand new contexts
 - Move role definition cache clear from the user-centric
   accesslib_clear_all_caches() to the newly created,
   role-dedicated accesslib_reset_role_cache()
2018-09-21 09:17:42 -04:00
Eloy Lafuente (stronk7)
db5057d7bd Merge branch 'MDL-63130_master' of git://github.com/markn86/moodle 2018-09-11 23:55:00 +02:00
Charles YVANES
458453cee0 MDL-29895 core: removed require_login() when not needed 2018-09-10 11:22:50 +02:00
Mark Nelson
8a261177f7 MDL-63130 core_message: add unit test 2018-09-06 18:16:33 +08:00
Pavel Sokolov
f88cc4ccae MDL-63130 message: message_count_unread_message counts sent messages 2018-09-06 18:16:06 +08:00
Eloy Lafuente (stronk7)
f6cafe495e Merge branch 'MDL-63249-master-enfix' of git://github.com/mudrd8mz/moodle 2018-09-04 22:34:51 +02:00
Helen Foster
24a29d720c MDL-63249 lang: Merge English strings from the en_fix language pack
Significant string changes:

* completionpass_help, gradetopassnotset in mod_quiz - grade to pass set
  in quiz settings not gradebook
* namecolumnmissing,core_cohort - fixing incorrect message about adding
  users to a cohort
2018-09-04 08:40:48 +02:00
David Mudrák
39d2c68856 MDL-61742 messaging: Do not send messages from inactive providers
Before this patch, we only checked that the given provider has been
configured in the user or system preferences. However, if the provider's
component is disabled, it does not even appear in these preferences.
Additionally, there was no check that the message / notification
provider is among providers allowed to be consumed by the recipient.

The patch checks that the message origin is among providers returned by
the message_get_providers_for_user() so disabled plugins can't act as
sources of messages and users can't receive messages from providers they
do not have capability for. This mitigates the risk of abusing a plugin
as a source of spam, for example.

Unit test is fixed and extended. When the $CFG->messaging is disabled,
no messages between users should be sent (I can't understand why the
unit test was written in an opposite way). Added assertions for the
raised debugging message.
2018-08-31 12:15:30 +02:00