MDL-62134 tool_dataprivacy: privacy manager wrapper

If exception occurs in one plugin implementation do not fail the whole job but
instead send a message to DPOs with the exception details
This commit is contained in:
Marina Glancy
2018-05-16 09:02:01 +08:00
committed by Andrew Nicols
parent 65abf2a37c
commit 3f18d2af9a
8 changed files with 116 additions and 6 deletions
@@ -33,6 +33,7 @@ use moodle_exception;
use moodle_url;
use tool_dataprivacy\api;
use tool_dataprivacy\data_request;
use tool_dataprivacy\manager;
defined('MOODLE_INTERNAL') || die();
@@ -87,7 +88,7 @@ class process_data_request_task extends adhoc_task {
$approvedclcollection = api::get_approved_contextlist_collection_for_request($requestpersistent);
// Export the data.
$manager = new \core_privacy\manager();
$manager = new manager();
$exportedcontent = $manager->export_user_data($approvedclcollection);
$fs = get_file_storage();
@@ -109,7 +110,7 @@ class process_data_request_task extends adhoc_task {
$approvedclcollection = api::get_approved_contextlist_collection_for_request($requestpersistent);
// Delete the data.
$manager = new \core_privacy\manager();
$manager = new manager();
$manager->delete_data_for_user($approvedclcollection);
}