2 This file is part of Moodle - http://moodle.org/
4 Moodle is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
9 Moodle is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more comments.
14 You should have received a copy of the GNU General Public License
15 along with Moodle. If not, see <http://www.gnu.org/licenses/>.
18 @template tool_dataprivacy/my_data_requests
20 A user's data requests page.
22 Classes required for JS:
25 Data attributes required for JS:
28 Context variables required for this template:
29 * requests - Array of data requests.
31 Example context (json):
36 "typename" : "Data export",
37 "comments": "I would like to download all of my daughter's personal data",
38 "statuslabelclass": "badge-secondary",
39 "statuslabel": "Pending",
40 "timecreated" : 1517902087,
42 "fullname": "Martha Smith",
48 "typename" : "Data export",
49 "comments": "Give me all of the information you have about me, or else...",
50 "statuslabelclass": "badge-warning",
51 "statuslabel": "Awaiting completion",
52 "timecreated" : 1517902087,
54 "fullname": "Martha Smith",
60 "typename" : "Data deletion",
61 "comments": "Please delete all of my son's personal data.",
62 "statuslabelclass": "badge-success",
63 "statuslabel": "Deleted",
64 "timecreated" : 1517902087,
66 "fullname": "Martha Smith",
72 "typename" : "Data deletion",
73 "comments": "Delete my data or I'm coming for you...",
74 "statuslabelclass": "label-danger",
75 "statuslabel": "Rejected",
76 "timecreated" : 1517902087,
78 "fullname": "Martha Smith",
84 "typename" : "Data export",
85 "comments": "Please let me download my data",
86 "statuslabelclass": "badge-info",
87 "statuslabel": "Processing",
88 "timecreated" : 1517902087,
90 "fullname": "Martha Smith",
96 "typename" : "Data export",
97 "comments": "Please let me download my data",
98 "statuslabelclass": "label",
99 "statuslabel": "Expired",
100 "statuslabeltitle": "Download has expired. Submit a new request if you wish to export your personal data.",
101 "timecreated" : 1517902087,
102 "requestedbyuser" : {
103 "fullname": "Martha Smith",
112 {{> core/notification_warning}}
115 <div data-region="datarequests">
116 <div class="m-t-1 m-b-1">
117 <a href="{{newdatarequesturl}}" class="btn btn-primary" data-action="new-request">
118 {{#str}}newrequest, tool_dataprivacy{{/str}}
121 <table class="generaltable fullwidth">
124 <th scope="col">{{#str}}requesttype, tool_dataprivacy{{/str}}</th>
125 <th scope="col">{{#str}}daterequested, tool_dataprivacy{{/str}}</th>
126 <th scope="col">{{#str}}requestby, tool_dataprivacy{{/str}}</th>
127 <th scope="col">{{#str}}requeststatus, tool_dataprivacy{{/str}}</th>
128 <th scope="col" colspan="2">{{#str}}message, tool_dataprivacy{{/str}}</th>
134 }} data-region="request-node"{{!
135 }} data-id="{{id}}"{{!
136 }} data-type="{{type}}"{{!
137 }} data-status="{{status}}"{{!
139 <td>{{typename}}</td>
140 <td>{{#userdate}} {{timecreated}}, {{#str}} strftimedatetime {{/str}} {{/userdate}}</td>
141 <td><a href="{{requestedbyuser.profileurl}}" title="{{#str}}viewprofile{{/str}}">{{requestedbyuser.fullname}}</a></td>
143 <span class="badge {{statuslabelclass}}" title="{{statuslabeltitle}}">{{statuslabel}}</span>
145 <td>{{comments}}</td>
148 {{> core/action_menu}}
155 <td class="text-muted" colspan="5">
156 {{#str}}nopersonaldatarequests, tool_dataprivacy{{/str}}
165 // Initialise the JS.
166 require(['tool_dataprivacy/myrequestactions'], function(ActionsMod) {