1120 Commits

Author SHA1 Message Date
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
Marina Glancy
442f12f81a MDL-62742 core: rename coursecat->core_course_category
Also rename course_in_list -> core_course_list_element
Deprecate class coursecat_sortable_records
2018-08-28 11:36:23 +02:00
Víctor Déniz Falcón
02fda279ed MDL-57281 behat: deprecated step definition I navigate to node in
Definition step deprecated and affected tests modified.
2018-08-20 12:53:26 +01:00
Andrew Nicols
f89f6cf04e Merge branch 'MDL-62899-search-icons-master' of https://github.com/dmitriim/moodle 2018-08-08 13:17:34 +08:00
Dmitrii Metelkin
66f145efd1 MDL-62899 search: add document icons 2018-08-07 17:40:57 +10:00
Andrew Nicols
4af25b000f Merge branch 'MDL-54741-master' of git://github.com/mihailges/moodle 2018-08-07 12:19:44 +08:00
Adrian Greeve
cc4952e997 MDL-55449 messages: Remove support for stdClass messages.
This also makes message_sent::create_from_ids() $courseid
parameter required.
2018-08-07 11:04:22 +08:00
Mihail Geshoski
216b89475d MDL-54741 general: 3.2 final deprecation in lib/deprecatedlib.php 2018-08-06 09:29:54 +08:00
Adrian Greeve
5454e72c21 MDL-55188 events: First deprecation of eventslib.php 2018-07-30 09:23:54 +08:00
Mark Nelson
b77e5841f8 MDL-62889 message_popup: redirect using moodle_url
Without this relative URLs passed (like /message/index.php)
were being redirected to HOST/message/index.php rather than
$CFG->wwwroot/message/index.php.
2018-07-17 11:54:52 +08:00
Mark Nelson
c5fcbd1081 MDL-62889 message_popup: redirect to notification page if url is empty
If you pass a URL that is not a valid URL (for example
';') it is cleaned to an empty string which redirects to
$CFG->wwwroot/message/output/popup/ which is not a valid
page.
2018-07-17 11:54:52 +08:00
Mark Nelson
7d5b9da80c MDL-62889 message_popup: allow redirects to external URLs
Many institutions create notifications that link to an
external service. We need to allow redirects to these
systems.
2018-07-17 11:44:41 +08:00
Mark Nelson
d2eb1ca91e MDL-62889 message_popup: only add redirecturl if it exists
We allow notifications to have a null value for the 'contexturl'.
In this case we should not be appending a 'redirecturl' param to
the URL when it is going to be empty.
2018-07-17 11:44:41 +08:00
Andrew Nicols
a31b3cf30b Merge branch 'MDL-62808_master' of git://github.com/markn86/moodle 2018-07-09 13:29:29 +08:00
Mark Nelson
c57fadcc64 MDL-62808 core_message: fixed 'useridto' being incorrectly set to 0 2018-07-09 12:00:06 +08:00
Michael Hawkins
6924e32e4a MDL-61359 message: Updated sender contact text to text node content 2018-06-29 10:26:07 +08:00
Jun Pataleta
d2b1d001bb Merge branch 'MDL-62709_master' of git://github.com/markn86/moodle 2018-06-18 15:16:18 +08:00
Mark Nelson
4f6cb2ee77 MDL-62658 message_popup: fixed issue with malformed URL being generated 2018-06-18 14:27:54 +08:00
Andrew Nicols
b885f0bf60 Merge branch 'MDL-57968-master' of git://github.com/cescobedo/moodle 2018-06-18 08:57:13 +08:00
Mark Nelson
cd9ecbd81c MDL-62709 core_message: convert NULL format types in task 2018-06-14 13:18:46 +08:00
David M Penner
8791c50d64 MDL-62709 core_message: fix for silently ignored errors in task 2018-06-14 12:20:42 +08:00
cescobedo
84e03ed859 MDL-57968 core_message: Remove multiple unnecessary AJAX requests
Remove AJAX requests core_message_get_unread_conversations_count and
message_popup_get_unread_popup_notification_count and
render the unread messages and notifications into mustache template.
2018-06-06 01:02:00 +02:00
Michael Hawkins
d0f3b5f083 MDL-61778 message: Renamed online status icon and replaced Boost icon 2018-06-01 10:15:11 +08:00
Jun Pataleta
f9be03432a Merge branch 'MDL-56498-master' of git://github.com/mickhawkins/moodle 2018-05-29 09:37:16 +08:00
Eloy Lafuente (stronk7)
00977e984e MDL-62478 upgrade: add 3.5.0 separation line to all upgrade scripts 2018-05-28 13:15:48 +02:00
Michael Hawkins
105974cd08 MDL-56498 message: Ensure clicked notifications are marked read 2018-05-16 14:59:06 +08:00
Andrew Nicols
823e08bf9d MDL-62393 message: Fix random unit test fails 2018-05-12 22:53:58 +08:00
David Monllao
99a080f12a Merge branch 'MDL-62361' of git://github.com/stronk7/moodle 2018-05-10 09:17:25 +08:00
Mark Nelson
b6b7c2636f MDL-62364 core: allow null for 'courseid' in notification_sent event
It's possible the '\core\message\message' object has a null value
for the 'courseid' which is used in \core\message\manager::send_message().
Make sure we compensate for this.
2018-05-09 17:27:00 +08:00
Eloy Lafuente (stronk7)
57ea6753d3 MDL-62361 versions: bump all versions and requires near release
version = 2018051400 release version
requires= 2018050800 current beta+ (week4roll1) version
2018-05-09 02:46:30 +02:00
Andrew Nicols
53a58dda1c Merge branch 'MDL-61919_master' of git://github.com/markn86/moodle 2018-05-07 15:45:43 +08:00
Mark Nelson
04cd1b3f31 MDL-61919 core_message: implement privacy provider 2018-05-03 20:44:05 +08:00
Jake Dallimore
e1ceb10ee8 Merge branch 'MDL-62268-master' of git://github.com/bmbrands/moodle 2018-05-02 10:12:32 +08:00
Bas Brands
264b7dffb4 MDL-62268 Theme boost: messaging interface rows 2018-04-30 12:51:32 +02:00
Helen Foster
970c1a4bf1 MDL-62181 lang: Merge English strings from the en_fix language pack
Significant string changes:

* sitepolicies, core_admin - 'Site policies' changed to 'Site security
  settings'
* processexpirationstask, enrol_paypal - more explanatory name
* sitepolicy_help and sitepolicyguest_help, core_admin - setting will
  only have an effect if the site policy handler is set to default
* sitepolicyhandler_desc,core_admin - improved wording
* pathtodot_help, core_admin - Windows and Mac paths
* debugstringids_desc, core_admin - improved explanation
2018-04-24 22:05:30 +02:00
Mark Nelson
10efd23b7c MDL-61764 message_popup: implement privacy provider 2018-04-20 12:05:32 +08:00
Eloy Lafuente (stronk7)
2d42e6e12c Merge branch 'MDL-61743_master' of git://github.com/dmonllao/moodle 2018-04-11 19:23:01 +02:00
Jake Dallimore
da16e3e3dc Merge branch 'MDL-61255_master' of git://github.com/markn86/moodle 2018-04-11 09:53:14 +08:00
Mihail Geshoski
2f9bd2bf90 MDL-61731 message_email: Add privacy files and unit tests 2018-04-11 09:03:58 +08:00
Mark Nelson
23de6f3a2d MDL-61255 core_message: add warning when notifications not migrated 2018-04-10 17:28:52 +08:00
Mark Nelson
78348dfc4e MDL-61255 core_message: added helper function to detect legacy messages 2018-04-10 17:28:52 +08:00
Mark Nelson
84f6a716b2 MDL-61255 core_message: migrate data from the 'message_popup' table 2018-04-10 17:26:43 +08:00
Mark Nelson
6f0731adc5 MDL-61255 core_message: adjusted upgrade.txt 2018-04-10 15:17:01 +08:00
Mark Nelson
e78523bff8 MDL-61255 message_popup: change API so it uses new table 2018-04-10 15:17:01 +08:00
Mark Nelson
1f64f17429 MDL-61255 message_popup: add table to store notifications 2018-04-10 15:17:01 +08:00
Mark Nelson
7022b8d9e4 MDL-61255 core_message: add notification when data not migrated 2018-04-10 15:17:01 +08:00
Mark Nelson
5cc6b3eeb5 MDL-61255 core_message: added unit test for task 2018-04-10 15:17:01 +08:00
Mark Nelson
41bc5aa587 MDL-61255 core_message: created task to handle migration of data 2018-04-10 15:17:01 +08:00
David Monllao
45ade52173 MDL-61743 message: Add context level checking 2018-04-06 09:09:15 +02:00
Jake Dallimore
1c217fa9ee Merge branch 'MDL-61761-master' of git://github.com/mihailges/moodle 2018-04-05 13:17:53 +08:00