MDL-72413 core: Disable the default activity header
This commit is contained in:
@@ -61,6 +61,7 @@ if ($returnurl) {
|
||||
}
|
||||
$PAGE->set_url($pageurl);
|
||||
$PAGE->set_context($context);
|
||||
$PAGE->activityheader->disable();
|
||||
|
||||
$contextname = $context->get_context_name();
|
||||
$courseid = $course->id;
|
||||
|
||||
@@ -87,6 +87,7 @@ if ($context->contextlevel == CONTEXT_BLOCK) {
|
||||
$PAGE->blocks->show_only_fake_blocks(true);
|
||||
}
|
||||
$PAGE->set_title($title);
|
||||
$PAGE->activityheader->disable();
|
||||
|
||||
switch ($context->contextlevel) {
|
||||
case CONTEXT_SYSTEM:
|
||||
|
||||
@@ -97,6 +97,7 @@ if ($context->contextlevel == CONTEXT_BLOCK) {
|
||||
}
|
||||
|
||||
$PAGE->set_title($title);
|
||||
$PAGE->activityheader->disable();
|
||||
switch ($context->contextlevel) {
|
||||
case CONTEXT_SYSTEM:
|
||||
print_error('cannotoverridebaserole', 'error');
|
||||
|
||||
@@ -107,6 +107,7 @@ switch ($type) {
|
||||
|
||||
$PAGE->set_title($heading);
|
||||
$PAGE->set_heading($heading);
|
||||
$PAGE->activityheader->disable();
|
||||
|
||||
if (empty($cancel)) {
|
||||
// Do not print the header if user cancelled the process, as we are going to redirect the user.
|
||||
|
||||
@@ -114,6 +114,7 @@ $PAGE->set_context($context);
|
||||
$PAGE->set_title(get_string('course') . ': ' . $coursefullname);
|
||||
$PAGE->set_heading($heading);
|
||||
$PAGE->set_pagelayout('admin');
|
||||
$PAGE->activityheader->disable();
|
||||
$PAGE->requires->js_call_amd('core_backup/async_backup', 'asyncBackupAllStatus', array($context->id));
|
||||
|
||||
$form = new course_restore_form(null, array('contextid'=>$contextid));
|
||||
|
||||
@@ -200,6 +200,7 @@ if ($mform->is_cancelled()) {
|
||||
if (isset($navbaraddition)) {
|
||||
$PAGE->navbar->add($navbaraddition);
|
||||
}
|
||||
$PAGE->activityheader->disable();
|
||||
|
||||
echo $OUTPUT->header();
|
||||
|
||||
|
||||
@@ -123,6 +123,7 @@ $straction = get_string('filters', 'admin'); // Used by tabs.php
|
||||
$PAGE->set_cacheable(false);
|
||||
$PAGE->set_title($title);
|
||||
$PAGE->set_pagelayout('admin');
|
||||
$PAGE->activityheader->disable();
|
||||
echo $OUTPUT->header();
|
||||
|
||||
/// Print heading.
|
||||
|
||||
@@ -2907,6 +2907,8 @@ EOD;
|
||||
//$this->page->set_pagelayout('base'); //TODO: MDL-20676 blocks on error pages are weird, unfortunately it somehow detect the pagelayout from URL :-(
|
||||
$this->page->set_title(get_string('error'));
|
||||
$this->page->set_heading($this->page->course->fullname);
|
||||
// No need to display the activity header when encountering an error.
|
||||
$this->page->activityheader->disable();
|
||||
$output .= $this->header();
|
||||
}
|
||||
|
||||
|
||||
@@ -1117,7 +1117,10 @@ function portfolio_export_pagesetup($PAGE, $caller) {
|
||||
|
||||
// and now we know the course for sure and maybe the cm, call require_login with it
|
||||
require_login($PAGE->course, false, $cm);
|
||||
|
||||
$PAGE->activityheader->set_attrs([
|
||||
'description' => '',
|
||||
'hidecompletion' => true
|
||||
]);
|
||||
foreach ($extranav as $navitem) {
|
||||
$PAGE->navbar->add($navitem['name']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user