From 0971131a7833daa870d070f888bd6a1b5206d5bb Mon Sep 17 00:00:00 2001 From: Michael Hawkins Date: Wed, 12 Sep 2018 17:26:03 +0800 Subject: [PATCH] MDL-63009 tool_dataprivacy: Added site name/link to request emails --- admin/tool/dataprivacy/classes/api.php | 2 ++ admin/tool/dataprivacy/lang/en/tool_dataprivacy.php | 1 + .../templates/data_request_email.mustache | 12 ++++++++++++ 3 files changed, 15 insertions(+) diff --git a/admin/tool/dataprivacy/classes/api.php b/admin/tool/dataprivacy/classes/api.php index 6ee970733d7..40b3a4ea8e9 100644 --- a/admin/tool/dataprivacy/classes/api.php +++ b/admin/tool/dataprivacy/classes/api.php @@ -619,6 +619,8 @@ class api { 'requestedby' => $requestedby->fullname, 'requesttype' => $typetext, 'requestdate' => userdate($requestdata->timecreated), + 'requestorigin' => $SITE->fullname, + 'requestoriginurl' => new moodle_url('/'), 'requestcomments' => $requestdata->messagehtml, 'datarequestsurl' => $datarequestsurl ]; diff --git a/admin/tool/dataprivacy/lang/en/tool_dataprivacy.php b/admin/tool/dataprivacy/lang/en/tool_dataprivacy.php index eb2c97fc83c..822f251520a 100644 --- a/admin/tool/dataprivacy/lang/en/tool_dataprivacy.php +++ b/admin/tool/dataprivacy/lang/en/tool_dataprivacy.php @@ -219,6 +219,7 @@ $string['requestdenied'] = 'The request has been denied'; $string['requestemailintro'] = 'You have received a data request:'; $string['requestfor'] = 'Requesting for'; $string['requestmarkedcomplete'] = 'The request has been marked as complete'; +$string['requestorigin'] = 'Request origin'; $string['requeststatus'] = 'Status'; $string['requestsubmitted'] = 'Your request has been submitted to the privacy officer'; $string['requesttype'] = 'Type'; diff --git a/admin/tool/dataprivacy/templates/data_request_email.mustache b/admin/tool/dataprivacy/templates/data_request_email.mustache index 1c993b29c2e..3cfda8b05eb 100644 --- a/admin/tool/dataprivacy/templates/data_request_email.mustache +++ b/admin/tool/dataprivacy/templates/data_request_email.mustache @@ -31,6 +31,8 @@ * string requestedby The one making the request. * string requesttype The request type. * string requestdate The date the request was made. + * string requestorigin The name of the site the request originates from. + * string requestoriginurl The homepage of the site the request originates from. * string requestcomments Additional details regarding the request. * bool forself Whether the request has been made on behalf of another user or not. * string datarequestsurl The URL to the data requests page. @@ -42,6 +44,8 @@ "requestedby": "Angus Zhang", "requesttype": "Export user data", "requestdate": "31 January 2018", + "requestorigin": "My Amazing Site", + "requestoriginurl": "https://www.bestmoodlesiteever.com", "requestcomments": "Dear admin,
I would like to request a copy of my son's user data. Thanks!", "forself": true, "datarequestsurl": "#" @@ -90,6 +94,14 @@ {{/forself}} + + + {{#str}}requestorigin, tool_dataprivacy{{/str}} + + + {{{requestorigin}}} + + {{#str}}requestcomments, tool_dataprivacy{{/str}}