From 2b97bb217d3b079ea48eb3a81b38c65a76208600 Mon Sep 17 00:00:00 2001 From: Gareth Barnard <1058419+gjb2048@users.noreply.github.com> Date: Wed, 8 Jan 2025 15:53:42 +0000 Subject: [PATCH] Fix 'admin/filters.php settings link leads nowhere' - #13. --- Changes.md | 1 + settings.php | 28 +++++++++++++--------------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/Changes.md b/Changes.md index 14ef904..826c2c5 100644 --- a/Changes.md +++ b/Changes.md @@ -2,6 +2,7 @@ Version Information =================== Version 39.1.3 - TBR -------------------------- +1. Fix 'admin/filters.php settings link leads nowhere' - #13. Version 39.1.2 - 08/10/23 -------------------------- diff --git a/settings.php b/settings.php index b46d4a5..ced1f12 100644 --- a/settings.php +++ b/settings.php @@ -24,16 +24,14 @@ */ defined('MOODLE_INTERNAL') || die; -$settings = null; -$ADMIN->add('filtersettings', new admin_category('filter_synhi', get_string('filtername', 'filter_synhi'))); - -// Information. -$page = new admin_settingpage( - 'filter_synhi_information', - get_string('information', 'filter_synhi') -); - if ($ADMIN->fulltree) { + $settings = new theme_boost_admin_settingspage_tabs('filtersettingsynhi', get_string('filtername', 'filter_synhi')); + + // Information. + $page = new admin_settingpage( + 'filter_synhi_information', + get_string('information', 'filter_synhi') + ); $page->add(new admin_setting_heading( 'filter_synhi_information', '', @@ -54,12 +52,11 @@ 'Changes.md', 'filter/synhi' )); -} -$ADMIN->add('filter_synhi', $page); -// Settings. -$page = new admin_settingpage('filter_synhi_settings', get_string('settings', 'filter_synhi')); -if ($ADMIN->fulltree) { + $settings->add($page); + + // Settings. + $page = new admin_settingpage('filter_synhi_settings', get_string('settings', 'filter_synhi')); // Engine. $name = 'filter_synhi/engine'; $title = get_string('engine', 'filter_synhi'); @@ -144,5 +141,6 @@ 'syntaxhighlighterinformation', '

' . get_string('syntaxhighlighterinformation', 'filter_synhi') . '

' )); + + $settings->add($page); } -$ADMIN->add('filter_synhi', $page);