{{! 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_dataprivacy/defaults_page Manage data registry defaults. Classes required for JS: Data attributes required for JS: Context variables required for this template: * contextlevel Number - The context level. * modecoursecat Boolean - Whether we're displaying defaults for course categories. * modecourse Boolean - Whether we're displaying defaults for courses. * modemodule Boolean - Whether we're displaying defaults for activity modules. * modeblock Boolean - Whether we're displaying defaults for blocks. * coursecaturl String - The URL for the course category defaults tab. * courseurl String - The URL for the course defaults tab. * moduleurl String - The URL for the activity module defaults tab. * blockurl String - The URL for the block defaults tab. * purposeid Number - The purpose ID for this context level. * canedit Boolean - Whether this is being rendered for editing purposes. * categoryid Number - The ID of the default category for this context level. * purposeid Number - The ID of the default purpose for this context level. * category String - The category name. * purpose String - The purpose name. * otherdefaults Array - An array containing the defaults for the activity modules. Example context (json): { "contextlevel": 70, "modecoursecat": false, "modecourse": false, "modemodule": true, "modeblock": false, "coursecaturl": "#", "courseurl": "#", "moduleurl": "#", "blockurl": "#", "category": "Awesome default category", "purpose": "Awesome default purpose", "canedit": true, "otherdefaults": [ { "name": "Assignment", "category": "Category for activity modules", "purpose": "Assessments" }, { "name": "Forum", "category": "Category for activity modules", "purpose": "Social interactions" } ] } }}

{{#modecoursecat}}{{#str}}categories{{/str}}{{/modecoursecat}} {{#modecourse}}{{#str}}courses{{/str}}{{/modecourse}} {{#modemodule}}{{#str}}activitymodules{{/str}}{{/modemodule}} {{#modeblock}}{{#str}}blocks{{/str}}{{/modeblock}}

{{> tool_dataprivacy/defaults_display}} {{#canedit}} {{#modemodule}} {{/modemodule}} {{/canedit}} {{#modemodule}} {{#canedit}} {{/canedit}} {{#otherdefaults}} {{#canedit}} {{/canedit}} {{/otherdefaults}}
  {{#str}}category, tool_dataprivacy{{/str}} {{#str}}purpose, tool_dataprivacy{{/str}}{{#str}}actions{{/str}}
{{name}} {{category}} {{purpose}} {{#actions}} {{> core/action_menu_link}} {{/actions}}
{{/modemodule}}
{{#js}} // Initialise the JS. require(['tool_dataprivacy/defaultsactions'], function(ActionsMod) { ActionsMod.init(); }); {{/js}}