Skip to content

Commit

Permalink
MDL-63009 tool_dataprivacy: Added site name/link to request emails
Browse files Browse the repository at this point in the history
  • Loading branch information
mickhawkins committed Sep 12, 2018
1 parent c37329d commit 4ca488c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions admin/tool/dataprivacy/classes/api.php
Expand Up @@ -616,6 +616,8 @@ public static function notify_dpo($dpo, data_request $request) {
'requestedby' => $requestedby->fullname,
'requesttype' => $typetext,
'requestdate' => userdate($requestdata->timecreated),
'requestorigin' => $SITE->fullname,
'requestoriginurl' => new moodle_url('/'),
'requestcomments' => $requestdata->messagehtml,
'datarequestsurl' => $datarequestsurl
];
Expand Down
1 change: 1 addition & 0 deletions admin/tool/dataprivacy/lang/en/tool_dataprivacy.php
Expand Up @@ -219,6 +219,7 @@
$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';
Expand Down
12 changes: 12 additions & 0 deletions admin/tool/dataprivacy/templates/data_request_email.mustache
Expand Up @@ -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.
Expand All @@ -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,<br/> I would like to request a copy of my son's user data. Thanks!",
"forself": true,
"datarequestsurl": "#"
Expand Down Expand Up @@ -90,6 +94,14 @@
</td>
</tr>
{{/forself}}
<tr>
<th scope="row">
{{#str}}requestorigin, tool_dataprivacy{{/str}}
</th>
<td>
<a href="{{requestoriginurl}}">{{{requestorigin}}}</a>
</td>
</tr>
<tr>
<th scope="row">
{{#str}}requestcomments, tool_dataprivacy{{/str}}
Expand Down

0 comments on commit 4ca488c

Please sign in to comment.