Skip to content

Commit

Permalink
MDL-61908 privacy: Fix heading in data privacy pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Mihail Geshoski authored and stronk7 committed Sep 18, 2018
1 parent 9093ace commit 9f1fd99
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions admin/tool/dataprivacy/categories.php
Expand Up @@ -33,6 +33,7 @@

$output = $PAGE->get_renderer('tool_dataprivacy');
echo $output->header();
echo $output->heading($title);

$categories = \tool_dataprivacy\api::get_categories();
$renderable = new \tool_dataprivacy\output\categories($categories);
Expand Down
4 changes: 2 additions & 2 deletions admin/tool/dataprivacy/classes/page_helper.php
Expand Up @@ -47,7 +47,7 @@ class page_helper {
*/
public static function setup(moodle_url $url, $title, $attachtoparentnode = '',
$requiredcapability = 'tool/dataprivacy:managedataregistry') {
global $PAGE;
global $PAGE, $SITE;

$context = context_system::instance();

Expand All @@ -65,7 +65,7 @@ public static function setup(moodle_url $url, $title, $attachtoparentnode = '',
$PAGE->set_context($context);
$PAGE->set_pagelayout('admin');
$PAGE->set_title($title);
$PAGE->set_heading($title);
$PAGE->set_heading($SITE->fullname);

// If necessary, override the settings navigation to add this page into the breadcrumb navigation.
if ($attachtoparentnode) {
Expand Down
4 changes: 2 additions & 2 deletions admin/tool/dataprivacy/createdatarequest.php
Expand Up @@ -78,8 +78,8 @@
redirect($returnurl, $redirectmessage);
}

$title = get_string('contactdataprotectionofficer', 'tool_dataprivacy');
$PAGE->set_heading($title);
$title = get_string('createnewdatarequest', 'tool_dataprivacy');
$PAGE->set_heading($SITE->fullname);
$PAGE->set_title($title);
echo $OUTPUT->header();
echo $OUTPUT->heading($title);
Expand Down
1 change: 1 addition & 0 deletions admin/tool/dataprivacy/datadeletion.php
Expand Up @@ -36,6 +36,7 @@
\tool_dataprivacy\page_helper::setup($url, $title);

echo $OUTPUT->header();
echo $OUTPUT->heading($title);

if (\tool_dataprivacy\api::is_site_dpo($USER->id)) {
$table = new \tool_dataprivacy\output\expired_contexts_table($filter);
Expand Down
1 change: 1 addition & 0 deletions admin/tool/dataprivacy/dataregistry.php
Expand Up @@ -37,6 +37,7 @@

$output = $PAGE->get_renderer('tool_dataprivacy');
echo $output->header();
echo $OUTPUT->heading($title);

if (\tool_dataprivacy\api::is_site_dpo($USER->id)) {
$dataregistry = new tool_dataprivacy\output\data_registry_page($contextlevel, $contextid);
Expand Down
1 change: 1 addition & 0 deletions admin/tool/dataprivacy/defaults.php
Expand Up @@ -66,5 +66,6 @@

$output = $PAGE->get_renderer('tool_dataprivacy');
echo $output->header();
echo $output->heading($title);
echo $output->render_from_template('tool_dataprivacy/defaults_page', $defaultspage->export_for_template($output));
echo $output->footer();
1 change: 1 addition & 0 deletions admin/tool/dataprivacy/lang/en/tool_dataprivacy.php
Expand Up @@ -61,6 +61,7 @@
$string['contextpurposecategorysaved'] = 'Purpose and category saved.';
$string['contactdpoviaprivacypolicy'] = 'Please contact the privacy officer as described in the privacy policy.';
$string['createcategory'] = 'Create data category';
$string['createnewdatarequest'] = 'Create a new data request';
$string['createpurpose'] = 'Create data purpose';
$string['datadeletion'] = 'Data deletion';
$string['datadeletionpagehelp'] = 'Data for which the retention period has expired are listed here. Please review and confirm data deletion, which will then be executed by the "Delete expired contexts" scheduled task.';
Expand Down
1 change: 1 addition & 0 deletions admin/tool/dataprivacy/purposes.php
Expand Up @@ -33,6 +33,7 @@

$output = $PAGE->get_renderer('tool_dataprivacy');
echo $output->header();
echo $output->heading($title);

$purposes = \tool_dataprivacy\api::get_purposes();
$renderable = new \tool_dataprivacy\output\purposes($purposes);
Expand Down
1 change: 0 additions & 1 deletion admin/tool/dataprivacy/templates/categories.mustache
Expand Up @@ -51,7 +51,6 @@
{{/navigation}}

<div data-region="categories" class="m-t-3 m-b-1">
<h3>{{#str}}categories, tool_dataprivacy{{/str}}</h3>
<div class="m-y-1">
<button class="btn btn-secondary" data-add-element="category" title="{{#str}}addcategory, tool_dataprivacy{{/str}}">
{{#pix}}t/add, moodle, {{#str}}addcategory, tool_dataprivacy{{/str}}{{/pix}}
Expand Down
1 change: 0 additions & 1 deletion admin/tool/dataprivacy/templates/purposes.mustache
Expand Up @@ -58,7 +58,6 @@
{{/navigation}}

<div data-region="purposes" class="m-t-3 m-b-1">
<h3>{{#str}}purposes, tool_dataprivacy{{/str}}</h3>
<div class="m-y-1">
<button class="btn btn-secondary" data-add-element="purpose" title="{{#str}}addpurpose, tool_dataprivacy{{/str}}">
{{#pix}}t/add, moodle, {{#str}}addpurpose, tool_dataprivacy{{/str}}{{/pix}}
Expand Down

0 comments on commit 9f1fd99

Please sign in to comment.