Merge branch 'MDL-63867-master' of git://github.com/mickhawkins/moodle

This commit is contained in:
Jun Pataleta
2018-11-09 15:31:28 +08:00
5 changed files with 58 additions and 0 deletions
@@ -74,6 +74,13 @@ class process_data_request_task extends adhoc_task {
return;
}
// If no site purpose is defined, reject requests since they cannot be processed.
if (!\tool_dataprivacy\data_registry::defaults_set()) {
api::update_request_status($requestid, api::DATAREQUEST_STATUS_REJECTED);
mtrace('No site purpose defined. Request ' . $requestid . ' rejected.');
return;
}
// Grab the manager.
// We set an observer against it to handle failures.
$manager = new \core_privacy\manager();