1085 Commits

Author SHA1 Message Date
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
Mihail Geshoski
0edc94e316 MDL-61761 message_jabber: Add privacy files and unit tests 2018-04-05 12:00:47 +08:00
Adrian Greeve
7820177f20 MDL-61629 message_airnotifier: Add privacy files and unit tests. 2018-04-03 15:33:31 +08:00
Mark Nelson
7489e4d5b9 MDL-36941 message_popup: do not remove message_popup table
This is a partial revert of commit 123631ad4718141627d77027dbef0448bae22ac8.

Most of the logic was NOT reverted, just the part deleting the table was.

Note - this fix was done on integration.git and as a result no
upgrade step was added to re-introduce the table, sorry! This
means for those on integration.git you will have to re-install
your Moodle site so the 'message_popup' table is present.

Please see tracker for comments as to why we need to keep it! :)
2018-03-28 18:16:46 +02:00
Mark Nelson
5aac33c785 MDL-36941 core_message: dont query DB unnecessarily checking read status 2018-03-23 12:30:31 +08:00
Mark Nelson
99248f6177 MDL-36941 core_message: fixed minor CiBoT complaints 2018-03-23 12:30:31 +08:00
Mark Nelson
e159b53b5b MDL-36941 core_message: improved performance of helper::get_messages()
Improved the query to use the 'convhash' field as well as adding an index.

Also fixed issue where 'timeread' was hardcoded as 0.
2018-03-23 12:30:30 +08:00
Mark Nelson
d0d1e97ab6 MDL-36941 core_message: added details to upgrade.txt 2018-03-23 12:30:30 +08:00
Mark Nelson
74ad60bfbe MDL-36941 core_message: deprecated 'api::mark_all_read_for_user' 2018-03-23 12:30:30 +08:00
Mark Nelson
0d657cc9b7 MDL-36941 core: removed 'message_working' table 2018-03-23 12:30:29 +08:00
Mark Nelson
123631ad47 MDL-36941 message_popup: removed 'message_popup' table 2018-03-23 12:30:29 +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
3f3e453632 MDL-36941 message_popup: use new WS for marking notifications as read
Also changed the observer to listen for the notification_viewed event,
rather than the message_viewed event.
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
376a79c242 MDL-36941 core: added events for notifications 2018-03-23 12:30:27 +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
Mark Nelson
ee14412e21 MDL-36941 core_message: removed unit test that will always fail
We are changing how the API behaves so the old tables will never
be populated. This unit test is testing a deprecated function
which we will not be refactoring to use the new table structure.
2018-03-23 09:27:57 +08:00
Marina Glancy
1727c939ba MDL-61477 admin: sitepolicy handler API
- Define sitepolicy handler manager class, base class and the core handler
- Allow to set a plugin as sitepolicyhandler that implements the sitepolicy API
- Modify web services to return information from the 3rd party handler instead of core if needed
2018-03-15 11:32:55 +08:00
Andrew Nicols
3406bdd6fa Merge branch 'MDL-61196_master' of git://github.com/markn86/moodle 2018-03-02 09:34:24 +08:00
Carlos
b999cee9a5 MDL-60547 message_popup: adding preventDefault at notification popover 2018-02-21 22:51:02 +01:00
Mark Nelson
cb21b5b7fb MDL-61196 message_popup: clean params before returning via WS 2018-02-09 17:35:51 +08:00
Adam Olley
e36a2f2aa7 MDL-60918 core_message: update preferences of user behat test 2018-01-16 05:07:13 +00:00
Ryan Wyllie
745783fa13 MDL-60918 message: use current user in message preference update 2018-01-16 03:49:55 +00:00
Eloy Lafuente (stronk7)
e4eba4c346 MDL-59159 upgrade: clean < 3.1.0 upgrade steps
LTS (3.5) requires previous LTS (3.1)

This just deletes all the upgrade steps previous to 3.1.0. Some
small adjustments, like adding missing MOODLE_INTERNAL or tweaking
globals can also be applied when needed.

Also includes an upgrade step to prevent upgrading from any
version < 2016052300 (v3.1.0) as anti-cheating measure.

Next commit will get rid of/deprecate all the upgradelib functions
not used anymore in codebase.
2017-12-04 01:18:57 +01: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
Eloy Lafuente (stronk7)
6499085f36 MDL-60784 upgrade: add 3.4.0 separation line to all upgrade scripts 2017-11-12 18:43:30 +01:00
Eloy Lafuente (stronk7)
ba854606e6 MDL-60764 versions: bump all versions and requires near release
version = 2017111300 release version
requires= 2017110800 current rc2 version
2017-11-10 02:52:53 +01:00
Kathrin Osswald
9cc55074d5 MDL-60522 message: Removed additional tooltips
I removed the additional tooltips because I think that they are just used
in the notifications and messages context and duplicate the all over used
title tag that gives the same information when hovering. So the whole system
stays more consistently.
2017-10-30 08:01:10 +01:00
Helen Foster
89db57ca6d MDL-60449 lang: Merge English strings from the en_fix language pack
Significant string changes:

* multiple strings in core_hub - 'Publish' changed to 'Share' plus other
  wording improvements to avoid misunderstandings
* errorretrievingkey in message_airnotifier - improved wording and
  removing reference to Moodle.org
* enddate_help and courseduration_desc in core - clearer wording
  explaining what the date actually does
* restore:viewautomatedfilearea in core_role - changing wording to match
  the behaviour
* dropzones_help in qtype_ddmarker - improved wording
* autologinkeygenerationlockout in tool_mobile - updated error message
* configallowemailaddresses in core_admin - clearer description
* subscriptionmode_helpin mod_forum - removing misleading sentence about
  subscription mode changes not affecting existing users
2017-10-19 17:19:08 +02:00
Marina Glancy
33683bc80c MDL-60281 general: function each() is deprecated in PHP7.2 2017-10-16 09:37:20 +08:00
sam marshall
66e3702680 MDL-55356 core_search: Change existing search areas to new API
This change considers all existing search areas in Moodle and makes
necessary changes.

Custom change to course search, supported by helper in base.php:

* course/classes/search/mycourse.php

Custom change to message search:

* message/classes/search/message_received.php
* message/classes/search/message_sent.php

Custom change to user search:

* user/classes/search/user.php

Custom changes to module areas, supported by helper in base_mod.php:

* mod/book/classes/search/chapter.php
* mod/data/classes/search/entry.php
* mod/forum/classes/search/post.php
* mod/glossary/classes/search/entry.php
* mod/survey/classes/search/activity.php
* mod/wiki/classes/search/collaborative_page.php

(Note: the unit tests do not exhaustively check every context type
for these, given that's mainly handled by the helper function
which was already tested in the base_activity test.)

Handled by block base class (no change):

* blocks/html/classes/search/content.php

Handled by activity base class (no change):

* mod/assign/classes/search/activity.php
* mod/book/classes/search/activity.php
* mod/chat/classes/search/activity.php
* mod/choice/classes/search/activity.php
* mod/data/classes/search/activity.php
* mod/feedback/classes/search/activity.php
* mod/folder/classes/search/activity.php
* mod/forum/classes/search/activity.php
* mod/glossary/classes/search/activity.php
* mod/imscp/classes/search/activity.php
* mod/label/classes/search/activity.php
* mod/lesson/classes/search/activity.php
* mod/lti/classes/search/activity.php
* mod/page/classes/search/activity.php
* mod/quiz/classes/search/activity.php
* mod/resource/classes/search/activity.php
* mod/scorm/classes/search/activity.php
* mod/url/classes/search/activity.php
* mod/wiki/classes/search/activity.php
* mod/workshop/classes/search/activity.php
2017-10-11 17:17:09 +01:00
sam marshall
81a988833e MDL-55356 core_message: Rename unit tests with wrong names 2017-10-11 17:17:08 +01:00
Eloy Lafuente (stronk7)
34ecee16bb Merge branch 'MDL-59882-master' of git://github.com/andrewnicols/moodle 2017-10-03 20:48:28 +02:00
Andrew Nicols
2a77813b51 MDL-59882 behat: Update known uses of dialogue CSS 2017-10-02 12:44:37 +08:00
Juan Leyva
e71687baf9 MDL-60198 webservice: Add missing MOODLE_INTERNAL checks 2017-09-21 13:01:28 +02:00