{{! This file is part of Moodle - http://moodle.org/ Moodle is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Moodle is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Moodle. If not, see . }} {{! @template tool_policy/acceptances Template for the user acceptances page. Classes required for JS: - Data attributes required for JS: - Context variables required for this template: * policies Example context (json): { "hasonbehalfagreements": true, "canrevoke": true, "policies": [ { "versions": [ { "isfirst": true, "policyid": 1, "viewurl": "/", "name": "Terms & conditions", "revision": "2.0", "hasarchived": true, "timeaccepted": "1 Mar 2018", "iscurrent": true, "isoptional": false, "agreement": { "onbehalf": false, "status": false, "canaccept": true, "acceptlink": "#" } }, { "isfirst": false, "policyid": 1, "viewurl": "/", "name": "Terms & conditions", "revision": "1.0-beta", "acceptedby": "Mary Smith", "note": "Based on parent's agreement via email", "hasarchived": false, "timeaccepted": "15 Feb 2018", "iscurrent": true, "isoptional": false, "agreement": { "onbehalf": true, "status": true, "canaccept": false } } ] } ] } }} {{^canrevoke}}
{{#str}} contactdpo, tool_policy {{/str}}
{{/canrevoke}} {{#hasonbehalfagreements}} {{/hasonbehalfagreements}} {{#policies}} {{#versions}} {{#agreement}} {{#hasonbehalfagreements}} {{/hasonbehalfagreements}} {{/agreement}} {{/versions}} {{/policies}}
{{#str}} policydocname, tool_policy {{/str}} {{#str}} policydocrevision, tool_policy {{/str}} {{#str}} response, tool_policy {{/str}} {{#str}} responseon, tool_policy {{/str}}{{#str}} responseby, tool_policy {{/str}} {{#str}} acceptancenote, tool_policy {{/str}}
{{^isfirst}}
{{#pix}} level, tool_policy {{/pix}}
{{/isfirst}}
{{{revision}}} {{#iscurrent}}{{#str}} status1, tool_policy {{/str}}{{/iscurrent}} {{#isoptional}}{{#str}} policydocoptionalyes, tool_policy {{/str}}{{/isoptional}} {{>tool_policy/user_agreement}} {{timeaccepted}}{{{acceptedby}}} {{{note}}} {{#hasarchived}}
{{#pix}}t/more, moodle, {{#str}}detailedmore, moodle{{/str}}{{/pix}}
{{/hasarchived}}
{{#returnurl}}
{{#str}} back {{/str}}
{{/returnurl}} {{#js}} require(['jquery'], function($) { $('body').on('click', '.showarchived', function(e) { e.preventDefault(); var target = $(this).attr('data-target'), status = $(this).attr('data-status'); if (status === 'hidden') { $(target).show(); $(this).attr('data-status', 'shown'); $(this).find('.toggleoff').show(); $(this).find('.toggleon').hide(); } else { $(target).hide(); $(this).attr('data-status', 'hidden'); $(this).find('.toggleon').show(); $(this).find('.toggleoff').hide(); } }); }); {{/js}}