1
0
mirror of https://github.com/moodle/moodle.git synced 2025-03-28 19:42:56 +01:00

Merge branch 'MDL-62544-master' of git://github.com/Dagefoerde/moodle

This commit is contained in:
Jun Pataleta 2018-05-29 16:24:59 +08:00
commit f1b701e6ce

@ -53,8 +53,9 @@ if ($manage) {
$PAGE->set_context($context);
// If contactdataprotectionofficer is disabled, send the user back to the profile page, or the privacy policy page.
if (!\tool_dataprivacy\api::can_contact_dpo()) {
redirect($returnurl, get_string('contactdpoviaprivacypolicy', 'tool_dataprivacy'), \core\output\notification::NOTIFY_ERROR);
// That is, unless you have sufficient capabilities to perform this on behalf of a user.
if (!$manage && !\tool_dataprivacy\api::can_contact_dpo()) {
redirect($returnurl, get_string('contactdpoviaprivacypolicy', 'tool_dataprivacy'), 0, \core\output\notification::NOTIFY_ERROR);
}
$mform = new tool_dataprivacy_data_request_form($url->out(false), ['manage' => !empty($manage)]);