From 373a09a86a5b5912b7c2895b524ace47bed0aca1 Mon Sep 17 00:00:00 2001 From: Adrian Greeve Date: Tue, 12 Jun 2018 10:11:52 +0800 Subject: [PATCH] MDL-62391 tool_dataprivacy: Added more detail about data requests. This adds the detail about who requested the data request to the tables and data request information page. --- .../tool/dataprivacy/lang/en/tool_dataprivacy.php | 1 + .../dataprivacy/templates/data_requests.mustache | 32 ++++++++++++++++++---- .../templates/my_data_requests.mustache | 32 ++++++++++++++++++---- .../dataprivacy/templates/request_details.mustache | 8 ++++++ 4 files changed, 63 insertions(+), 10 deletions(-) diff --git a/admin/tool/dataprivacy/lang/en/tool_dataprivacy.php b/admin/tool/dataprivacy/lang/en/tool_dataprivacy.php index 40dc1e7cadb..b8622d80edd 100644 --- a/admin/tool/dataprivacy/lang/en/tool_dataprivacy.php +++ b/admin/tool/dataprivacy/lang/en/tool_dataprivacy.php @@ -193,6 +193,7 @@ $string['purposeupdated'] = 'Purpose updated'; $string['replyto'] = 'Reply to'; $string['requestactions'] = 'Actions'; $string['requestby'] = 'Requested by'; +$string['requestbydetail'] = 'Requested by:'; $string['requestcomments'] = 'Comments'; $string['requestcomments_help'] = 'This box enables you to enter any further details about your data request.'; $string['requestemailintro'] = 'You have received a data request:'; diff --git a/admin/tool/dataprivacy/templates/data_requests.mustache b/admin/tool/dataprivacy/templates/data_requests.mustache index 93c9a8ca38d..45cedc629f3 100644 --- a/admin/tool/dataprivacy/templates/data_requests.mustache +++ b/admin/tool/dataprivacy/templates/data_requests.mustache @@ -41,7 +41,11 @@ "comments": "I would like to download all of my daughter's personal data", "statuslabelclass": "label-default", "statuslabel": "Pending", - "timecreated" : 1517902435 + "timecreated" : 1517902435, + "requestedbyuser" : { + "fullname": "Martha Smith", + "profileurl": "#" + } }, { "id": 2, @@ -53,7 +57,11 @@ "comments": "Please give me all of the information you have about me...", "statuslabelclass": "label-warning", "statuslabel": "Awaiting completion", - "timecreated" : 1517902435 + "timecreated" : 1517902435, + "requestedbyuser" : { + "fullname": "Martha Smith", + "profileurl": "#" + } }, { "id": 3, @@ -65,7 +73,11 @@ "comments": "Please delete all of my son's personal data.", "statuslabelclass": "label-success", "statuslabel": "Complete", - "timecreated" : 1517902435 + "timecreated" : 1517902435, + "requestedbyuser" : { + "fullname": "Martha Smith", + "profileurl": "#" + } }, { "id": 4, @@ -77,7 +89,11 @@ "comments": "I would like to request for my personal data to be deleted from your site. Thanks!", "statuslabelclass": "label-danger", "statuslabel": "Rejected", - "timecreated" : 1517902435 + "timecreated" : 1517902435, + "requestedbyuser" : { + "fullname": "Martha Smith", + "profileurl": "#" + } }, { "id": 5, @@ -89,7 +105,11 @@ "comments": "Please let me download my data", "statuslabelclass": "label-info", "statuslabel": "Processing", - "timecreated" : 1517902435 + "timecreated" : 1517902435, + "requestedbyuser" : { + "fullname": "Martha Smith", + "profileurl": "#" + } } ] } @@ -111,6 +131,7 @@ {{#str}}requesttype, tool_dataprivacy{{/str}} {{#str}}user, tool_dataprivacy{{/str}} {{#str}}daterequested, tool_dataprivacy{{/str}} + {{#str}}requestby, tool_dataprivacy{{/str}} {{#str}}requeststatus, tool_dataprivacy{{/str}} {{#str}}message, tool_dataprivacy{{/str}} @@ -126,6 +147,7 @@ {{typenameshort}} {{foruser.fullname}} {{#userdate}} {{timecreated}}, {{#str}} strftimedatetime {{/str}} {{/userdate}} + {{requestedbyuser.fullname}} {{statuslabel}} diff --git a/admin/tool/dataprivacy/templates/my_data_requests.mustache b/admin/tool/dataprivacy/templates/my_data_requests.mustache index 6cc39e1f9a6..2b654b29467 100644 --- a/admin/tool/dataprivacy/templates/my_data_requests.mustache +++ b/admin/tool/dataprivacy/templates/my_data_requests.mustache @@ -37,7 +37,11 @@ "comments": "I would like to download all of my daughter's personal data", "statuslabelclass": "label-default", "statuslabel": "Pending", - "timecreated" : 1517902087 + "timecreated" : 1517902087, + "requestedbyuser" : { + "fullname": "Martha Smith", + "profileurl": "#" + } }, { "id": 2, @@ -45,7 +49,11 @@ "comments": "Give me all of the information you have about me, or else...", "statuslabelclass": "label-warning", "statuslabel": "Awaiting completion", - "timecreated" : 1517902087 + "timecreated" : 1517902087, + "requestedbyuser" : { + "fullname": "Martha Smith", + "profileurl": "#" + } }, { "id": 3, @@ -53,7 +61,11 @@ "comments": "Please delete all of my son's personal data.", "statuslabelclass": "label-success", "statuslabel": "Complete", - "timecreated" : 1517902087 + "timecreated" : 1517902087, + "requestedbyuser" : { + "fullname": "Martha Smith", + "profileurl": "#" + } }, { "id": 4, @@ -61,7 +73,11 @@ "comments": "Delete my data or I'm coming for you...", "statuslabelclass": "label-danger", "statuslabel": "Rejected", - "timecreated" : 1517902087 + "timecreated" : 1517902087, + "requestedbyuser" : { + "fullname": "Martha Smith", + "profileurl": "#" + } }, { "id": 5, @@ -69,7 +85,11 @@ "comments": "Please let me download my data", "statuslabelclass": "label-info", "statuslabel": "Processing", - "timecreated" : 1517902087 + "timecreated" : 1517902087, + "requestedbyuser" : { + "fullname": "Martha Smith", + "profileurl": "#" + } } ] } @@ -90,6 +110,7 @@ {{#str}}requesttype, tool_dataprivacy{{/str}} {{#str}}daterequested, tool_dataprivacy{{/str}} + {{#str}}requestby, tool_dataprivacy{{/str}} {{#str}}requeststatus, tool_dataprivacy{{/str}} {{#str}}message, tool_dataprivacy{{/str}} @@ -104,6 +125,7 @@ }}> {{typename}} {{#userdate}} {{timecreated}}, {{#str}} strftimedatetime {{/str}} {{/userdate}} + {{requestedbyuser.fullname}} {{statuslabel}} diff --git a/admin/tool/dataprivacy/templates/request_details.mustache b/admin/tool/dataprivacy/templates/request_details.mustache index afa5c48c8cf..c8e9dc19d95 100644 --- a/admin/tool/dataprivacy/templates/request_details.mustache +++ b/admin/tool/dataprivacy/templates/request_details.mustache @@ -44,6 +44,10 @@ "canreview": true, "reviewurl": "#", "timecreated": 1517561224, + "requestedbyuser" : { + "fullname": "Martha Smith", + "profileurl": "#" + }, "statuslabel": "Pending", "statuslabelclass": "label-default", "messagehtml": "

Hello,

I would like to download all of my personal data.

Thanks!

" @@ -69,6 +73,10 @@ {{#str}}statusdetail, tool_dataprivacy{{/str}} {{statuslabel}} + + {{#str}}requestbydetail, tool_dataprivacy{{/str}} + {{requestedbyuser.fullname}} + {{#canreview}} -- 2.11.4.GIT