-
Bug
-
Resolution: Fixed
-
Minor
-
4.2.2
-
WP Sprint 2023-I3.2 (Atlantic)
If I want to remove navbar on a page that has course category context, I need to call
$PAGE->navbar->ignore_active(true);
|
this shows debugging message:
- Warning: Undefined variable $outcome in /.../lib/navigationlib.php on line 3672
I'm not sure how to reproduce it in core, but I can do it on a custom page like this:
require('../../../config.php');
|
|
require_login();
|
|
$url = new moodle_url('/admin/tool/sitenavdemo/x.php', []);
|
$PAGE->set_url($url);
|
$catid = core_course_category::top()->get_all_children_ids()[0];
|
$PAGE->set_context(context_coursecat::instance($catid));
|
|
$PAGE->navbar->ignore_active(true);
|
$PAGE->set_heading($SITE->fullname);
|
echo $OUTPUT->header();
|
echo $OUTPUT->footer();
|
In order to reproduce in core, you can just add
$PAGE->navbar->ignore_active(true);
|
anywhere in the course/index.php and open it for any category