Commit Graph

45 Commits

Author SHA1 Message Date
Mark Nelson c57fadcc64 MDL-62808 core_message: fixed 'useridto' being incorrectly set to 0 2018-07-09 12:00:06 +08:00
Mark Nelson b2cd17e6a9 MDL-36941 core: added 'convhash' field to quickly get conversations 2018-03-23 12:30:28 +08:00
Mark Nelson 2b595d96f4 MDL-36941 core: added new mark notification as read webservice 2018-03-23 12:30:28 +08:00
Mark Nelson 548936a6c9 MDL-36941 core_message: mark notification/messages takes stdClass
This avoid unnecessary DB calls.
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
sam marshall a938e4096c MDL-60174 core_dml: fix miscellaneous incorrect recordset usage
The new recordset support for Postgres requires transactions and
will cause errors if recordsets are not closed correctly. This
commit fixes problems that were identified during unit tests, and
via some basic code analysis, across all core code. Most of these
are incorrect usage of recordset (forgetting to close them).
2017-11-27 11:10:33 +00:00
Ryan Wyllie 4d146f1a45 MDL-57370 message: unit tests for get_conversations 2017-02-07 01:04:11 +00:00
Michael Aherne 46c5c88321 MDL-57630 messaging: Pass unit test with third-party plugins 2017-01-11 16:37:46 +00:00
Mark Nelson cb8057531f MDL-56871 core_message: fix inconsistent online status between panels 2016-11-23 16:32:46 +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
Ryan Wyllie fb1469d84f MDL-56139 message: ajax poll for new messages in message area 2016-11-16 10:22:33 +08:00
David Monllao 5d0299e275 Merge branch 'MDL-56666-master' of git://github.com/jleyva/moodle 2016-11-03 10:28:59 +08:00
Juan Leyva 2521afd2e8 MDL-56666 message: New WS core_message_get_user_message_preferences 2016-11-02 12:16:23 +00:00
Eloy Lafuente (stronk7) a1f6a27c80 Merge branch 'MDL-47162' of git://github.com/merrill-oakland/moodle 2016-10-31 22:45:37 +01:00
Eric Merrill 880fc15bf0 MDL-47162 core_message: Updating all uses of messaging to add courseid 2016-10-31 14:13:13 -04:00
Simey Lameze 343ba16c31 MDL-56501 message: introduce new manageallmessaging capability 2016-10-31 14:09:03 +08:00
Adrian Greeve 87d4ab654b MDL-56138 messaging: Update to messaging unit tests. 2016-10-31 10:52:05 +08:00
Eric Merrill 0e8b51607b MDL-47162 core_message: Cleanup of messaging course ids code 2016-10-27 18:12:42 +02:00
Amanda Doughty cc350fd9c8 MDL-47162 core_message: Add course id to message eventdata 2016-10-27 18:11:27 +02:00
Mark Nelson 6aa019682c MDL-55823 core_message: added WS unit tests 2016-10-19 17:07:58 +08:00
Juan Leyva e86f0cb4a1 MDL-55393 message: New WS get_user_notification_preferences 2016-10-13 19:32:06 +02:00
Ryan Wyllie 7d69958e6b MDL-56292 message: move popover code into output plugin 2016-10-11 14:39:23 +08:00
Ryan Wyllie 5cdebf2d7e MDL-56292 message: simplify get_popup_notifications function 2016-10-10 12:48:51 +08:00
Mark Nelson 7b55aaa12e MDL-55942 core: obey the mighty CiBoT 2016-10-07 16:26:40 +08:00
Ryan Wyllie 0b19d04836 MDL-55812 message: simplify notification popover items 2016-10-07 16:26:40 +08:00
Ryan Wyllie ada7695d7c MDL-54708 message: notification popover respects message preferences 2016-10-07 16:26:40 +08:00
Ryan Wyllie 3274d5ca66 MDL-54708 message: add backend APIs for notifications popover 2016-10-07 16:26:40 +08:00
Rajesh Taneja 52f3e060e4 MDL-55091 phpunit: Following has been deprecated.
1. getMock()
2. setExpectedException()
3. checkForUnintentionallyCoveredCode renamed to beStrictAboutCoversAnnotation
4. beStrictAboutTestSize renamed to enforceTimeLimit
5. UnitTestCase class is now fully removed.
2016-07-26 10:11:30 +08:00
Juan Leyva ea21d6370f MDL-52570 message: Do not return deleted messages in WS 2016-01-07 12:10:32 +01:00
Juan Leyva 419b112832 MDL-52108 messages: New WS core_message_delete_message 2015-11-12 12:05:49 +01:00
Juan Leyva 013937907f MDL-42626 messages: Hide deleted users in contact/blocked list 2015-07-30 23:05:51 +02:00
Juan Leyva 0b074e88d6 MDL-50459 messages: Handle deleted users in external functions 2015-06-14 22:12:00 +02:00
Juan Leyva b679582707 MDL-49501 messages: Unit tests for mark_message_read 2015-04-02 17:02:20 +02:00
Juan Leyva ff1f373996 MDL-48719 messages: Unit tests for WS core_message_get_blocked_users 2015-01-29 13:04:43 +01:00
Sam Hemelryk 127ef54082 Merge branch 'MDL-45374' of git://github.com/jleyva/moodle 2014-10-06 10:44:30 +13:00
Juan Leyva 6ff4464b43 MDL-45374 messages: get_messages ws unit tests 2014-10-03 16:37:13 +02:00
Petr Škoda 8252b7c291 MDL-40901 standardise core test case class and file names
This finally allows us to type only the class name when executing individual core test cases.
2013-08-04 22:10:31 +02:00
Andrew Davis 2e2d197798 MDL-37164 core_message: prevent users from interacting with themself 2013-02-11 08:48:56 +08:00
Dan Poltawski 751f00a0bb Revert "MDL-37164 core_message: prevent users from interacting with themself"
Was breaking unit tests.

This reverts commit 61a73b43c1 and 7bb19ee167.
2013-02-05 14:42:20 +08:00
Dan Poltawski 61a73b43c1 MDL-37164 message - fix broken unit tests
We have fixed the returning of the guest user now
2013-02-05 14:27:20 +08:00
Eloy Lafuente (stronk7) 7356e732b7 MDL-37086 phpunit: use alt reset method.
When code executed in test cases is using/preventing
database transactions, phpunit itself cannot
use transactions for reseting between cases. But we
can tell it about, so some alternative (and slower)
method for reseting will be used.
2013-01-28 18:25:38 +01:00
Eloy Lafuente (stronk7) 493d8f781c Merge branch 'MDL-37354-master' of git://github.com/mouneyrac/moodle
Conflicts:
	message/tests/externallib_test.php
2013-01-15 21:50:31 +01:00
Frederic Massart d6731600c8 MDL-30070 message: Web Services for contact list 2013-01-15 16:04:00 +08:00
Jerome Mouneyrac fb695f6e3d MDL-37354 clean return value for each externallib PHPUnit tests 2013-01-09 13:47:01 +08:00
Jerome Mouneyrac e643266843 MDL-34972 PHPunit test: message/externallib.php 2012-09-03 15:27:22 +08:00