Commit Graph

21 Commits

Author SHA1 Message Date
Mark Nelson 0d657cc9b7 MDL-36941 core: removed 'message_working' table 2018-03-23 12:30:29 +08:00
Mark Nelson 376a79c242 MDL-36941 core: added events for notifications 2018-03-23 12:30:27 +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
Mark Nelson 685daf1aed MDL-58650 core_message: always use 'popup' processor for messages 2017-05-02 15:46:48 +08:00
Andrew Nicols bc378b50ec Merge branch 'wip-MDL-44467-master' of git://github.com/abgreeve/moodle 2016-11-03 14:08:21 +08:00
Adrian Greeve e0789335ee MDL-44467 lib: Unit test updates. 2016-10-28 13:27:00 +08:00
Simey Lameze 253ae23058 MDL-44467 core: always send email from noreplyaddress 2016-10-28 13:04:09 +08:00
Amanda Doughty cc350fd9c8 MDL-47162 core_message: Add course id to message eventdata 2016-10-27 18:11:27 +02:00
rajesh Taneja 5ecf8e8f21 MDL-51266 unittest: replaced low level phpunit_util calls 2015-09-23 15:42:48 +08:00
Andrew Nicols fc05c1b8e5 MDL-48197 testing: Normalise uses of noemailever and phpmailer sink 2014-11-19 09:09:50 +08:00
Petr Skoda 5cf50f96e7 MDL-48083 dml: Empty buffers on forced rollback 2014-11-06 15:52:37 +13:00
Simey Lameze 9a2c52571e MDL-44257 message: added test to make sure the stored file still exists 2014-09-16 10:07:17 +08:00
Petr Skoda 349f98ad3e MDL-45941 implement support for message sending from DB transactions and fix other problems
This patch includes following fixes:
 - messages may be now sent when database transactions active
 - consistent return status on failure from message_send(), false is
   returned only when message not created in message(_read)? table,
   processor failure results in debugging message only and messages
   are not marked as read
 - message_sent is triggered always with id from message table
 - logic for marking messages as viewed was standardised
 - message_viewed event is triggered consistently
 - improved performance when fetching user preferences
 - full unit tests coverage for send_message() function
 - fixed multiple other smaller issues discovered by unit tests
2014-06-17 16:09:43 +12:00
Juan Leyva 5e12b369af MDL-44954 messages: Fixed save notifications with the notification flag 2014-04-07 12:19:52 +02:00
Michael Aherne 780cf0a728 MDL-43440 unit tests Use correct cm identifier in unit tests 2014-01-25 08:56:43 +11:00
Rajesh Taneja fd0f7ac5c2 MDL-33618 Messages: Added support to disable message provider 2013-11-21 09:40:34 +08:00
Petr Škoda f007e89961 MDL-42224 clean up message and email redirection testing 2013-10-12 13:59:07 +02:00
Yuliya Bozhko 56b9a02eea MDL-41956 messages: Accept attachments in send_message() in email message provider 2013-10-01 15:38:02 +13:00
Petr Škoda 2988b725bc MDL-39915 cleanup core_messagelib_testcase 2013-07-27 19:39:47 +02:00
Andrew Davis (andyjdavis) 6ba8a4bee2 MDL-30545 messaging prefs: add Andy's extra unit tests. 2012-10-23 18:41:43 +08:00
Tim Hunt 2cf5ab1028 MDL-30545 messaging prefs: show all relevant message providers.
Some message providers have an associated capability. For example
the mod/quiz:emailconfirmsubmission capability. At the moment,
we only show the preferences for the capabilities that the user
has in the system context.

That does not work for the example capability above. Typically
the capability will be overridden in one quiz, to allow for
Students, and the user will have the Student role in the course
context. Therefore, this message type does not appear on the
preferences page.

This fix corrects the logic, so that all message types that are
to the current user are displayed.
2012-10-23 18:41:43 +08:00