$context = context_system::instance();
// Make sure the user has the proper capability.
require_capability('tool/dataprivacy:managedatarequests', $context);
+ navigation_node::override_active_url($returnurl);
} else {
// For the case where a user makes request for themselves (or for their children if they are the parent).
$returnurl = new moodle_url($CFG->wwwroot . '/admin/tool/dataprivacy/mydatarequests.php');
$context = context_user::instance($USER->id);
}
+
$PAGE->set_context($context);
+if (!$manage && $profilenode = $PAGE->settingsnav->find('myprofile', null)) {
+ $profilenode->make_active();
+}
+
+$title = get_string('createnewdatarequest', 'tool_dataprivacy');
+$PAGE->navbar->add($title);
+
// If contactdataprotectionofficer is disabled, send the user back to the profile page, or the privacy policy page.
// That is, unless you have sufficient capabilities to perform this on behalf of a user.
if (!$manage && !\tool_dataprivacy\api::can_contact_dpo()) {
redirect($returnurl, $redirectmessage);
}
-$title = get_string('createnewdatarequest', 'tool_dataprivacy');
$PAGE->set_heading($SITE->fullname);
$PAGE->set_title($title);
echo $OUTPUT->header();
$usercontext = context_user::instance($USER->id);
$PAGE->set_context($usercontext);
+if ($profilenode = $PAGE->settingsnav->find('myprofile', null)) {
+ $profilenode->make_active();
+}
+
+$title = get_string('datarequests', 'tool_dataprivacy');
+$PAGE->navbar->add($title);
+
// Return URL.
$params = ['id' => $USER->id];
if ($courseid) {
}
$returnurl = new moodle_url('/user/profile.php', $params);
-$title = get_string('datarequests', 'tool_dataprivacy');
$PAGE->set_heading($title);
$PAGE->set_title($title);
echo $OUTPUT->header();
$requestid = required_param('requestid', PARAM_INT);
$confirm = optional_param('confirm', null, PARAM_INT);
-$PAGE->set_url(new moodle_url('/admin/tool/dataprivacy/resubmitrequest.php', ['requestid' => $requestid]));
+$url = new moodle_url('/admin/tool/dataprivacy/resubmitrequest.php', ['requestid' => $requestid]);
+$title = get_string('resubmitrequestasnew', 'tool_dataprivacy');
-require_login();
-
-$PAGE->set_context(\context_system::instance());
-require_capability('tool/dataprivacy:managedatarequests', $PAGE->context);
+\tool_dataprivacy\page_helper::setup($url, $title, 'datarequests', 'tool/dataprivacy:managedatarequests');
$manageurl = new moodle_url('/admin/tool/dataprivacy/datarequests.php');
redirect($manageurl, get_string('resubmittedrequest', 'tool_dataprivacy', $stringparams));
}
-$heading = get_string('resubmitrequest', 'tool_dataprivacy', $stringparams);
-$PAGE->set_title($heading);
-$PAGE->set_heading($heading);
-
echo $OUTPUT->header();
$confirmstring = get_string('confirmrequestresubmit', 'tool_dataprivacy', $stringparams);
$PAGE->set_title($title);
$PAGE->set_heading($SITE->fullname);
+// If user is logged in, then use profile navigation in breadcrumbs.
+if ($profilenode = $PAGE->settingsnav->find('myprofile', null)) {
+ $profilenode->make_active();
+}
+
+$PAGE->navbar->add($title);
+
$output = $PAGE->get_renderer('tool_dataprivacy');
echo $output->header();
$summarypage = new \tool_dataprivacy\output\summary_page();
if (!has_capability('tool/policy:acceptbehalf', $context)) {
require_capability('tool/policy:viewacceptances', $context);
}
+
+ $user = core_user::get_user($userid);
+ $PAGE->navigation->extend_for_user($user);
}
+$title = get_string('policiesagreements', 'tool_policy');
+
$PAGE->set_context($context);
$PAGE->set_pagelayout('standard');
$PAGE->set_url(new moodle_url('/admin/tool/policy/user.php', ['userid' => $userid]));
+$PAGE->set_title($title);
+
+if ($userid == $USER->id &&
+ ($profilenode = $PAGE->settingsnav->find('myprofile', null))) {
+
+ $profilenode->make_active();
+}
+
+$PAGE->navbar->add($title);
$output = $PAGE->get_renderer('tool_policy');
echo $output->header();
-echo $output->heading(get_string('policiesagreements', 'tool_policy'));
+echo $output->heading($title);
$acceptances = new \tool_policy\output\acceptances($userid, $returnurl);
echo $output->render($acceptances);
$PAGE->requires->js_call_amd('tool_policy/acceptmodal', 'getInstance', [context_system::instance()->id]);