mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +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_context($systemcontext);
|
||||
$PAGE->set_pagelayout('admin');
|
||||
|
||||
if (can_edit_in_category()) {
|
||||
if ($categoryedit !== -1) {
|
||||
|
@ -55,8 +55,10 @@
|
||||
$frontpagectx = get_context_instance(CONTEXT_COURSE, SITEID);
|
||||
|
||||
if ($isfrontpage) {
|
||||
$PAGE->set_pagelayout('admin');
|
||||
require_capability('moodle/site:viewparticipants', $systemcontext);
|
||||
} else {
|
||||
$PAGE->set_pagelayout('incourse');
|
||||
require_capability('moodle/course:viewparticipants', $context);
|
||||
}
|
||||
|
||||
|
@ -108,6 +108,12 @@ $PAGE->set_subpage($currentpage->id);
|
||||
$PAGE->set_title("$SITE->shortname: $strpublicprofile");
|
||||
$PAGE->set_heading("$SITE->shortname: $strpublicprofile");
|
||||
$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
|
||||
|
Loading…
x
Reference in New Issue
Block a user