mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 17:06:53 +02:00
MDL-62768 tool_policy: add page title & breadcrumb navigation.
This commit is contained in:
parent
bff97f158e
commit
95f2f7cc9f
1 changed files with 15 additions and 1 deletions
|
@ -39,15 +39,29 @@ if ($userid != $USER->id) {
|
||||||
if (!has_capability('tool/policy:acceptbehalf', $context)) {
|
if (!has_capability('tool/policy:acceptbehalf', $context)) {
|
||||||
require_capability('tool/policy:viewacceptances', $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_context($context);
|
||||||
$PAGE->set_pagelayout('standard');
|
$PAGE->set_pagelayout('standard');
|
||||||
$PAGE->set_url(new moodle_url('/admin/tool/policy/user.php', ['userid' => $userid]));
|
$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');
|
$output = $PAGE->get_renderer('tool_policy');
|
||||||
echo $output->header();
|
echo $output->header();
|
||||||
echo $output->heading(get_string('policiesagreements', 'tool_policy'));
|
echo $output->heading($title);
|
||||||
$acceptances = new \tool_policy\output\acceptances($userid, $returnurl);
|
$acceptances = new \tool_policy\output\acceptances($userid, $returnurl);
|
||||||
echo $output->render($acceptances);
|
echo $output->render($acceptances);
|
||||||
$PAGE->requires->js_call_amd('tool_policy/acceptmodal', 'getInstance', [context_system::instance()->id]);
|
$PAGE->requires->js_call_amd('tool_policy/acceptmodal', 'getInstance', [context_system::instance()->id]);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue