Commit graph

106 commits

Author SHA1 Message Date
sam marshall
02fab5539c MDL-64497 GDPR: moodle_content_writer can cause endless loop
Fixes a buggy function by replacing it with a call to file_get_contents,
and adds error detection on a couple of file accesses.
2019-01-03 17:04:13 +00:00
Adrian Greeve
3692fe595c MDL-62061 core_privacy: Stop directories being created.
This stops directories being created in the root directory
while running unit tests.
2018-12-06 11:39:01 +01:00
Damyon Wiese
35bc9f8bb2 MDL-64220 privacy: Clean path params
We need to consistently clean the path params before we use them. This
shows a difference on windows where dir separators are different.
2018-11-27 15:02:44 +08:00
Jun Pataleta
4e0886f362 Merge branch 'MDL-63660-35' of git://github.com/junpataleta/moodle into MOODLE_35_STABLE 2018-11-16 10:52:58 +08:00
Mark Johnson
c2650d3f3d MDL-63660 privacy: Include CSS locally for data export 2018-11-16 10:49:10 +08:00
David Monllao
a3c626c7e7 Merge branch 'MDL-63925-35' of git://github.com/mickhawkins/moodle into MOODLE_35_STABLE 2018-11-12 11:57:54 +01:00
Andrew Nicols
a14a44ee13 MDL-63924 core_privacy: Add shared_userlist provider 2018-11-08 21:27:22 +08:00
Michael Hawkins
20957bbd12 MDL-63925 privacy: Fixed Moodle URL in template 2018-11-08 15:54:42 +08:00
Andrew Nicols
6404971918 Merge branch 'MDL-63816-35' of git://github.com/mickhawkins/moodle into MOODLE_35_STABLE 2018-11-02 08:00:49 +08:00
David Monllao
a25a4d30be Merge branch 'MDL-62601-35' of git://github.com/andrewnicols/moodle into MOODLE_35_STABLE 2018-10-31 06:47:43 +01:00
Andrew Nicols
1760650216 MDL-62601 core_privacy: Ensure providers can handle deleted users 2018-10-31 13:45:00 +08:00
Michael Hawkins
eaae1a7ea1 MDL-63816 privacy: Corrected interface get_users_in_context description 2018-10-31 12:14:43 +08:00
Andrew Nicols
18b69cc33d Merge branch 'MDL-63690-35' of git://github.com/mihailges/moodle into MOODLE_35_STABLE 2018-10-31 08:23:28 +08:00
Adrian Greeve
710c4de820 MDL-63267 privacy: Create deprecated provider interface.
Any interfaces that have become deprecated should extend
this interface.
2018-10-26 18:26:19 -04:00
Mihail Geshoski
90be3a42f3 MDL-63690 core_privacy: Handle when add_users() receives an empty array 2018-10-26 09:26:55 +08:00
Andrew Nicols
bdf43538fb MDL-63495 privacy: Add support for removal of multiple users in a context
This issue is a part of the MDL-62560 Epic.
2018-10-17 13:13:49 +08:00
Adrian Greeve
1db088f085 MDL-62491 core_privacy: Add html files to the user data export.
This adds html to the data export that allows for easier navigation
and reading of data.
2018-10-09 09:40:06 +08:00
Michael Hawkins
83dc898b00 MDL-62660 tool_dataprivacy: Add ability to expire data requests
Also replaced Completed status with situation specific statuses.
Also improved UX on request pages in line with expiries and the aadditional statuses.
2018-08-20 16:27:45 +08:00
Eloy Lafuente (stronk7)
8539f6168e MDL-62619 privacy: Prevent action when boolean queries are involved
Before the patch, queries like:

SELECT 1 FROM dual UNION SELECT 2 FROM dual

were failing badly, with everything but the first numeric element
being ignored by the optimization.

So, being conservative, now we reduce the query being analysed,
ignoring any subquery, inline view (anything within parenthesis
in general) and, in the remaining query, if a boolean query (UNION,
MINUS, INTERSECT...) is found, we don't apply any optimization.
2018-08-09 16:16:12 +02:00
David Mudrák
df26945105 MDL-62619 privacy: Fix some bits of performance improvements
* We need to use is_numeric() in this case as is_int() would never
  return true.
* Extend the supported cases, add support for SQL consisting just of
  numerical value or selectinga numerical constant.
* Do not rely on any particulat letter case in provided SQL.
* Add unit tests for the new method. Even when it is a protected one, it
  is an essential unit to be tested on its own.
2018-07-27 10:14:38 +02:00
Andrew Nicols
b9b8d94716 MDL-62619 privacy: Improve performance of contexts loading
When possible, we want to use JOIN over WHERE IN. It is known that the
later performs badly in MySQL.
2018-07-27 10:14:38 +02:00
Adrian Greeve
3c22418e0a MDL-62574 core_privacy: Unit tests to check the context base.
This now tests the possibility of a context being deleted.
2018-06-12 11:26:23 +08:00
Adrian Greeve
94269e4505 MDL-62574 core_privacy: Check the contextlist for real contexts.
There are situations when contexts will be deleted in the provider.
The context list is not updated and so we have introduced a try
catch.
2018-06-12 11:26:11 +08:00
Marina Glancy
004fd4259e MDL-62147 privacy: unittest ensures that all tables covered 2018-05-16 13:57:19 +08:00
Andrew Nicols
22c0a30888 MDL-62134 core_privacy: Allow for a failure handler 2018-05-16 11:52:46 +08:00
Marina Glancy
65abf2a37c MDL-62134 privacy: consistantly call components methods 2018-05-16 09:02:01 +08:00
David Monllao
014335fb2b Merge branch 'MDL-62370-master' of git://github.com/andrewnicols/moodle 2018-05-14 16:00:32 +02:00
Andrew Nicols
502344a904 MDL-62370 core_privacy: Directory-less subsystems are compliant 2018-05-14 19:59:43 +08:00
David Monllao
05dcf35796 Merge branch 'MDL-62425-master' of git://github.com/andrewnicols/moodle 2018-05-14 10:57:14 +02:00
Andrew Nicols
66f2da2e0a MDL-62425 core_privacy: Add core to the list of components 2018-05-14 15:40:56 +08:00
Eloy Lafuente (stronk7)
24bd0bc3b3 Merge branch 'MDL-62371-master' of git://github.com/andrewnicols/moodle 2018-05-14 02:37:38 +02:00
Eloy Lafuente (stronk7)
28ec28e026 Merge branch 'MDL-62251-master' of git://github.com/rezaies/moodle 2018-05-13 20:10:44 +02:00
Andrew Nicols
563852791d MDL-62371 core_privacy: Add support for progress trace 2018-05-13 15:45:24 +08:00
Andrew Nicols
7b4fa14f36 MDL-61858 core_privacy: Add test to ensure component implementations 2018-05-11 19:37:48 +08:00
Jun Pataleta
0697a52218 Merge branch 'MDL-62394-master' of git://github.com/andrewnicols/moodle 2018-05-11 14:23:41 +08:00
Andrew Nicols
20f3b33b24 MDL-62394 privacy: Make JSON export pretty 2018-05-11 14:12:10 +08:00
Shamim Rezaie
8614257135 MDL-62251 Privacy: Fix dir separator in export_file() 2018-05-10 23:30:38 +10:00
Shamim Rezaie
07890336ab MDL-62251 Privacy: Url path separator should be platform independant
It should always be forward slash.
2018-05-10 23:30:38 +10:00
Shamim Rezaie
44efefcbeb MDL-62251 Privacy: Fix get_path() and get_full_path() bug in Windows 2018-05-10 23:30:23 +10:00
Jake Dallimore
84bc2245f7 Merge branch 'MDL-62383-master' of git://github.com/junpataleta/moodle 2018-05-10 10:03:32 +08:00
Jun Pataleta
6c0c9d5d08 MDL-62383 privacy: Close recordset in contextlist::add_from_sql() 2018-05-10 09:55:33 +08:00
Andrew Nicols
06ede94f07 Merge branch 'wip-MDL-62351-master' of git://github.com/marinaglancy/moodle 2018-05-10 09:17:28 +08:00
David Monllao
6fe7510ae0 Merge branch 'wip-MDL-61976-master' of git://github.com/marinaglancy/moodle 2018-05-10 09:15:59 +08:00
Marina Glancy
468c8d39c3 MDL-62351 privacy: check that subsystem/plugintype exist 2018-05-09 17:37:31 +08:00
Jake Dallimore
e4a37fbef1 MDL-62029 core_course: Fixes to context-aware provider implementation. 2018-05-09 15:34:41 +08:00
Adrian Greeve
9faf51a7ca MDL-62029 core_privacy: context aware provider creation. 2018-05-09 10:11:47 +08:00
Marina Glancy
2d9d4a1d88 MDL-61976 privacy: replace pluginfile in test writer 2018-05-08 12:03:41 +08:00
Marina Glancy
8dd8486355 MDL-61976 privacy: add subcontext argument to has_any_data 2018-05-08 12:03:41 +08:00
Andrew Nicols
630a72f19f Merge branch 'MDL-62285-master' of git://github.com/ryanwyllie/moodle 2018-05-08 11:08:03 +08:00
Andrew Nicols
9846d710fe Merge branch 'wip-MDL-62137-master' of git://github.com/abgreeve/moodle 2018-05-07 15:24:01 +08:00