Cleanup and improve admin settings navigation#78
Merged
daniil-berg merged 4 commits intomainfrom Apr 2, 2026
Merged
Conversation
The type annotation comment for global variables must be placed directly before the first usage of that variable. Unfortunately global $ADMIN does not count as usage.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull requests performs some refactoring to clean the code and optimise the UI of the admin settings navigation tree:
require_once("$CFG->dirroot/mod/assign/adminlib.php")is not needed. We do not need a library frommod_assign.tool_monitoringis the categorytool_monitoring_overviewis the external page with the overview tabletool_monitoring_exportersis the category for the exportersadmin_externalpage_setup('tool_monitoring_overview')and$PAGE->set_secondary_active_tab('modules')to correctly setup this page as an admin external page. As a result the title, header, breadcrumb navigation and the active indicator in the secondary navigation are now shown correctly. See below for a before and after screenshot.Before:

After:

Our admin category for comparison:

Our metrics overview admin external page now has the same look and feel as the regular admin category page.