mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
navigation MDL-14632 Added pagelayout calls to set more appropriate page layouts
This commit is contained in:
parent
abf63f981b
commit
c07dfe7021
@ -42,6 +42,7 @@ $systemcontext = get_context_instance(CONTEXT_SYSTEM);
|
|||||||
|
|
||||||
$PAGE->set_url('/course/index.php');
|
$PAGE->set_url('/course/index.php');
|
||||||
$PAGE->set_context($systemcontext);
|
$PAGE->set_context($systemcontext);
|
||||||
|
$PAGE->set_pagelayout('admin');
|
||||||
|
|
||||||
if (can_edit_in_category()) {
|
if (can_edit_in_category()) {
|
||||||
if ($categoryedit !== -1) {
|
if ($categoryedit !== -1) {
|
||||||
|
@ -55,8 +55,10 @@
|
|||||||
$frontpagectx = get_context_instance(CONTEXT_COURSE, SITEID);
|
$frontpagectx = get_context_instance(CONTEXT_COURSE, SITEID);
|
||||||
|
|
||||||
if ($isfrontpage) {
|
if ($isfrontpage) {
|
||||||
|
$PAGE->set_pagelayout('admin');
|
||||||
require_capability('moodle/site:viewparticipants', $systemcontext);
|
require_capability('moodle/site:viewparticipants', $systemcontext);
|
||||||
} else {
|
} else {
|
||||||
|
$PAGE->set_pagelayout('incourse');
|
||||||
require_capability('moodle/course:viewparticipants', $context);
|
require_capability('moodle/course:viewparticipants', $context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,6 +108,12 @@ $PAGE->set_subpage($currentpage->id);
|
|||||||
$PAGE->set_title("$SITE->shortname: $strpublicprofile");
|
$PAGE->set_title("$SITE->shortname: $strpublicprofile");
|
||||||
$PAGE->set_heading("$SITE->shortname: $strpublicprofile");
|
$PAGE->set_heading("$SITE->shortname: $strpublicprofile");
|
||||||
$PAGE->navigation->extend_for_user($user);
|
$PAGE->navigation->extend_for_user($user);
|
||||||
|
if ($node = $PAGE->settingsnav->get('userviewingsettings')) {
|
||||||
|
$node->forceopen = true;
|
||||||
|
if ($node = $PAGE->settingsnav->get('root')) {
|
||||||
|
$node->forceopen = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Toggle the editing state and switches
|
// Toggle the editing state and switches
|
||||||
|
Loading…
x
Reference in New Issue
Block a user