Whoops! There was an error.
Whoops \ Exception \ ErrorException (E_WARNING)
include(/home/user/htdocs/srv940643.hstgr.cloud/local/mblexai_v2/version.php): Failed to open stream: No such file or directory Whoops\Exception\ErrorException thrown with message "include(/home/user/htdocs/srv940643.hstgr.cloud/local/mblexai_v2/version.php): Failed to open stream: No such file or directory" Stacktrace: #15 Whoops\Exception\ErrorException in /home/user/htdocs/srv940643.hstgr.cloud/lib/classes/plugin_manager.php:320 #14 include in /home/user/htdocs/srv940643.hstgr.cloud/lib/classes/plugin_manager.php:320 #13 core\plugin_manager:load_present_plugins in /home/user/htdocs/srv940643.hstgr.cloud/lib/classes/plugin_manager.php:364 #12 core\plugin_manager:get_present_plugins in /home/user/htdocs/srv940643.hstgr.cloud/lib/classes/plugininfo/base.php:283 #11 core\plugininfo\base:load_disk_version in /home/user/htdocs/srv940643.hstgr.cloud/lib/classes/plugininfo/base.php:207 #10 core\plugininfo\base:make_plugin_instance in /home/user/htdocs/srv940643.hstgr.cloud/lib/classes/plugininfo/base.php:157 #9 core\plugininfo\base:get_plugins in /home/user/htdocs/srv940643.hstgr.cloud/lib/classes/plugininfo/qbank.php:60 #8 core\plugininfo\qbank:get_plugins in /home/user/htdocs/srv940643.hstgr.cloud/lib/classes/plugin_manager.php:432 #7 core\plugin_manager:get_plugins_of_type in /home/user/htdocs/srv940643.hstgr.cloud/lib/classes/plugin_manager.php:681 #6 core\plugin_manager:get_plugin_info in /home/user/htdocs/srv940643.hstgr.cloud/lib/classes/plugininfo/qbank.php:83 #5 core\plugininfo\qbank:get_enabled_plugins in /home/user/htdocs/srv940643.hstgr.cloud/lib/classes/plugin_manager.php:269 #4 core\plugin_manager:load_enabled_plugins in /home/user/htdocs/srv940643.hstgr.cloud/lib/classes/plugin_manager.php:288 #3 core\plugin_manager:get_enabled_plugins in /home/user/htdocs/srv940643.hstgr.cloud/admin/tool/dataprivacy/classes/output/summary_page.php:96 #2 tool_dataprivacy\output\summary_page:export_for_template in /home/user/htdocs/srv940643.hstgr.cloud/admin/tool/dataprivacy/classes/output/renderer.php:146 #1 tool_dataprivacy\output\renderer:render_summary_page in /home/user/htdocs/srv940643.hstgr.cloud/lib/classes/output/plugin_renderer_base.php:78 #0 core\output\plugin_renderer_base:render in /home/user/htdocs/srv940643.hstgr.cloud/admin/tool/dataprivacy/summary.php:47
Stack frames (16)
15
Whoops\Exception\ErrorException
/lib/classes/plugin_manager.php320
14
include
/lib/classes/plugin_manager.php320
13
core\plugin_manager load_present_plugins
/lib/classes/plugin_manager.php364
12
core\plugin_manager get_present_plugins
/lib/classes/plugininfo/base.php283
11
core\plugininfo\base load_disk_version
/lib/classes/plugininfo/base.php207
10
core\plugininfo\base make_plugin_instance
/lib/classes/plugininfo/base.php157
9
core\plugininfo\base get_plugins
/lib/classes/plugininfo/qbank.php60
8
core\plugininfo\qbank get_plugins
/lib/classes/plugin_manager.php432
7
core\plugin_manager get_plugins_of_type
/lib/classes/plugin_manager.php681
6
core\plugin_manager get_plugin_info
/lib/classes/plugininfo/qbank.php83
5
core\plugininfo\qbank get_enabled_plugins
/lib/classes/plugin_manager.php269
4
core\plugin_manager load_enabled_plugins
/lib/classes/plugin_manager.php288
3
core\plugin_manager get_enabled_plugins
/admin/tool/dataprivacy/classes/output/summary_page.php96
2
tool_dataprivacy\output\summary_page export_for_template
/admin/tool/dataprivacy/classes/output/renderer.php146
1
tool_dataprivacy\output\renderer render_summary_page
/lib/classes/output/plugin_renderer_base.php78
0
core\output\plugin_renderer_base render
/admin/tool/dataprivacy/summary.php47
/home/user/htdocs/srv940643.hstgr.cloud/lib/classes/plugin_manager.php
        }
 
        $cache = cache::make('core', 'plugin_manager');
        $present = $cache->get('present');
 
        if (is_array($present)) {
            $this->presentplugins = $present;
            return;
        }
 
        $this->presentplugins = [];
 
        $allplugintypes = core_component::get_all_plugin_types();
        foreach ($allplugintypes as $type => $typedir) {
            $plugs = core_component::get_all_plugins_list($type);
            foreach ($plugs as $plug => $fullplug) {
                $module = new stdClass();
                $plugin = new stdClass();
                $plugin->version = null;
                include($fullplug . '/version.php');
 
                // Check if the legacy $module syntax is still used.
                if (!is_object($module) || (count((array)$module) > 0)) {
                    debugging('Unsupported $module syntax detected in version.php of the ' . $type . '_' . $plug . ' plugin.');
                    $skipcache = true;
                }
 
                // Check if the component is properly declared.
                if (empty($plugin->component) || ($plugin->component !== $type . '_' . $plug)) {
                    debugging('Plugin ' . $type . '_' . $plug . ' does not declare valid $plugin->component in its version.php.');
                    $skipcache = true;
                }
 
                $this->presentplugins[$type][$plug] = $plugin;
            }
        }
 
        if (empty($skipcache)) {
            $cache->set('present', $this->presentplugins);
        }
/home/user/htdocs/srv940643.hstgr.cloud/lib/classes/plugin_manager.php
        }
 
        $cache = cache::make('core', 'plugin_manager');
        $present = $cache->get('present');
 
        if (is_array($present)) {
            $this->presentplugins = $present;
            return;
        }
 
        $this->presentplugins = [];
 
        $allplugintypes = core_component::get_all_plugin_types();
        foreach ($allplugintypes as $type => $typedir) {
            $plugs = core_component::get_all_plugins_list($type);
            foreach ($plugs as $plug => $fullplug) {
                $module = new stdClass();
                $plugin = new stdClass();
                $plugin->version = null;
                include($fullplug . '/version.php');
 
                // Check if the legacy $module syntax is still used.
                if (!is_object($module) || (count((array)$module) > 0)) {
                    debugging('Unsupported $module syntax detected in version.php of the ' . $type . '_' . $plug . ' plugin.');
                    $skipcache = true;
                }
 
                // Check if the component is properly declared.
                if (empty($plugin->component) || ($plugin->component !== $type . '_' . $plug)) {
                    debugging('Plugin ' . $type . '_' . $plug . ' does not declare valid $plugin->component in its version.php.');
                    $skipcache = true;
                }
 
                $this->presentplugins[$type][$plug] = $plugin;
            }
        }
 
        if (empty($skipcache)) {
            $cache->set('present', $this->presentplugins);
        }
/home/user/htdocs/srv940643.hstgr.cloud/lib/classes/plugin_manager.php
     *
     * @return stdClass
     */
    protected static function load_standard_plugins(): stdClass {
        if (static::$standardplugincache === null) {
            $data = file_get_contents(dirname(__DIR__) . '/plugins.json');
            static::$standardplugincache = json_decode($data, false);
        }
 
        return static::$standardplugincache;
    }
 
    /**
     * Get list of present plugins of given type.
     *
     * @param string $type
     * @return array|null  list of presnet plugins $name=>$diskversion, null if unknown
     */
    public function get_present_plugins($type) {
        $this->load_present_plugins();
        if (isset($this->presentplugins[$type])) {
            return $this->presentplugins[$type];
        }
        return null;
    }
 
    /**
     * Returns a tree of known plugins and information about them
     *
     * @param bool $includeindeprecation whether to include plugins which are in deprecation (deprecated or deleted status).
     * @return array 2D array. The first keys are plugin type names (e.g. qtype);
     *      the second keys are the plugin local name (e.g. multichoice); and
     *      the values are the corresponding objects extending {@link \core\plugininfo\base}
     */
    public function get_plugins(bool $includeindeprecation = false) {
        $this->init_pluginsinfo_property();
 
        // Make sure all types are initialised.
        foreach ($this->pluginsinfo as $plugintype => $list) {
            if ($list === null) {
/home/user/htdocs/srv940643.hstgr.cloud/lib/classes/plugininfo/base.php
     * @return string e.g. $CFG->dirroot . '/mod/quiz/version.php'.
     */
    public function full_path($relativepath) {
        if (empty($this->rootdir)) {
            return '';
        }
        return $this->rootdir . '/' . $relativepath;
    }
 
    /**
     * Sets {@link $versiondisk} property to a numerical value representing the
     * version of the plugin's source code.
     *
     * If the value is null after calling this method, either the plugin
     * does not use versioning (typically does not have any database
     * data) or is missing from disk.
     */
    public function load_disk_version() {
        // Note: this includes deprecated plugins.
        $versions = $this->pluginman->get_present_plugins($this->type);
 
        $this->versiondisk = null;
        $this->versionrequires = null;
        $this->pluginsupported = null;
        $this->pluginincompatible = null;
        $this->dependencies = array();
 
        if (!isset($versions[$this->name])) {
            return;
        }
 
        $plugin = $versions[$this->name];
 
        if (isset($plugin->version)) {
            $this->versiondisk = $plugin->version;
        }
        if (isset($plugin->requires)) {
            $this->versionrequires = $plugin->requires;
        }
        if (isset($plugin->release)) {
/home/user/htdocs/srv940643.hstgr.cloud/lib/classes/plugininfo/base.php
     *
     * @param string $type the plugin type, eg. 'mod'
     * @param string $typerootdir full path to the location of all the plugins of this type
     * @param string $name the plugin name, eg. 'workshop'
     * @param string $namerootdir full path to the location of the plugin
     * @param string $typeclass the name of class that holds the info about the plugin
     * @param core_plugin_manager $pluginman the plugin manager of the new instance
     * @return base the instance of $typeclass
     */
    protected static function make_plugin_instance($type, $typerootdir, $name, $namerootdir, $typeclass, $pluginman) {
        $plugin              = new $typeclass();
        $plugin->type        = $type;
        $plugin->typerootdir = $typerootdir;
        $plugin->name        = $name;
        $plugin->rootdir     = $namerootdir;
        $plugin->pluginman   = $pluginman;
        $plugin->component   = $plugin->type.'_'.$plugin->name;
 
        $plugin->init_display_name();
        $plugin->load_disk_version();
        $plugin->load_db_version();
        $plugin->init_is_standard();
        $plugin->init_is_deprecated();
 
        return $plugin;
    }
 
    /**
     * Is this plugin already installed and updated?
     * @return bool true if plugin installed and upgraded.
     */
    public function is_installed_and_upgraded() {
        if (!$this->rootdir) {
            return false;
        }
        if ($this->versiondb === null and $this->versiondisk === null) {
            // There is no version.php or version info inside it.
            return false;
        }
 
/home/user/htdocs/srv940643.hstgr.cloud/lib/classes/plugininfo/base.php
     * either on disk or previously installed.
     *
     * This is supposed to be used exclusively by the plugin manager when it is
     * populating its tree of plugins.
     *
     * @param string $type the name of the plugintype, eg. mod, auth or workshopform
     * @param string $typerootdir full path to the location of the plugin dir
     * @param string $typeclass the name of the actually called class
     * @param core_plugin_manager $pluginman the plugin manager calling this method
     * @return array of plugintype classes, indexed by the plugin name
     */
    public static function get_plugins($type, $typerootdir, $typeclass, $pluginman) {
        // Get the information about plugins at the disk, including deprecated plugins.
        $plugins = core_component::get_all_plugins_list($type);
 
        // Also included deleted plugins.
 
        $return = array();
        foreach ($plugins as $pluginname => $pluginrootdir) {
            $return[$pluginname] = self::make_plugin_instance($type, $typerootdir,
                $pluginname, $pluginrootdir, $typeclass, $pluginman);
        }
 
        // Fetch missing incorrectly uninstalled plugins, including deprecated plugins which are not included above.
        $plugins = $pluginman->get_installed_plugins($type);
 
        foreach ($plugins as $name => $version) {
            if (isset($return[$name])) {
                continue;
            }
            $plugin              = new $typeclass();
            $plugin->type        = $type;
            $plugin->typerootdir = $typerootdir;
            $plugin->name        = $name;
            $plugin->component   = $plugin->type.'_'.$plugin->name;
            $plugin->rootdir     = null;
            $plugin->displayname = $name;
            $plugin->versiondb   = $version;
            $plugin->pluginman   = $pluginman;
            $plugin->init_is_standard();
/home/user/htdocs/srv940643.hstgr.cloud/lib/classes/plugininfo/qbank.php
 
    public function is_uninstall_allowed(): bool {
        if (in_array($this->name, \core_plugin_manager::standard_plugins_list('qbank'))) {
            return false;
        }
        return true;
    }
 
    public static function get_manage_url(): \moodle_url {
        return new \moodle_url('/admin/settings.php', ['section' => 'manageqbanks']);
    }
 
    public function get_settings_section_name() {
        return $this->type . '_' . $this->name;
    }
 
    public static function get_plugins($type, $typerootdir, $typeclass, $pluginman): array {
        global $CFG;
 
        $qbank = parent::get_plugins($type, $typerootdir, $typeclass, $pluginman);
        $order = array_keys($qbank);
        $sortedqbanks = [];
        foreach ($order as $qbankname) {
            $sortedqbanks[$qbankname] = $qbank[$qbankname];
        }
        return $sortedqbanks;
    }
 
    public static function get_enabled_plugins(): ?array {
        global $CFG;
        $pluginmanager = \core_plugin_manager::instance();
        $plugins = $pluginmanager->get_installed_plugins('qbank');
 
        if (!$plugins) {
            return [];
        }
 
        $plugins = array_keys($plugins);
 
        // Filter to return only enabled plugins.
/home/user/htdocs/srv940643.hstgr.cloud/lib/classes/plugin_manager.php
        if (!array_key_exists($type, $this->pluginsinfo) || $exclude) {
            return [];
        }
 
        if (is_array($this->pluginsinfo[$type])) {
            return $this->pluginsinfo[$type];
        }
 
        $allplugintypes = core_component::get_all_plugin_types();
 
        if (!isset($allplugintypes[$type])) {
            // Orphaned subplugins!
            $plugintypeclass = static::resolve_plugininfo_class($type);
            $this->pluginsinfo[$type] = $plugintypeclass::get_plugins($type, null, $plugintypeclass, $this);
            return $this->pluginsinfo[$type];
        }
 
        $plugintypeclass = static::resolve_plugininfo_class($type);
        if (isset($allplugintypes[$type])) {
            $plugins = $plugintypeclass::get_plugins($type, $allplugintypes[$type], $plugintypeclass, $this);
        }
        $this->pluginsinfo[$type] = $plugins;
 
        return $this->pluginsinfo[$type];
    }
 
    /**
     * Init placeholder array for plugin infos.
     */
    protected function init_pluginsinfo_property() {
        if (is_array($this->pluginsinfo)) {
            return;
        }
        $this->pluginsinfo = [];
 
        // The pluginsinfo instance var contains keys for all plugin types, including those currently in deprecation.
        // Other methods should filter their returns as needed, based on key checks, or by checking either
        // $plugininfo->is_deprecated() or $plugininfo->is_deleted().
        $plugintypes = array_merge(
            $this->get_plugin_types(),
/home/user/htdocs/srv940643.hstgr.cloud/lib/classes/plugin_manager.php
        if (get_string_manager()->string_exists('type_' . $type . '_plural', 'core_plugin')) {
            // For most plugin types, their names are defined in core_plugin lang file.
            return get_string('type_' . $type . '_plural', 'core_plugin');
        } else if ($parent = $this->get_parent_of_subplugin($type)) {
            // If this is a subplugin, try to ask the parent plugin for the name.
            return $this->plugin_name($parent) . ' / ' . get_string('subplugintype_' . $type . '_plural', $parent);
        } else {
            return $type;
        }
    }
 
    /**
     * Returns information about the known plugin, or null
     *
     * @param string $component frankenstyle component name.
     * @return \core\plugininfo\base|null the corresponding plugin information.
     */
    public function get_plugin_info($component) {
        [$type, $name] = core_component::normalize_component($component);
        $plugins = $this->get_plugins_of_type($type, true);
        if (isset($plugins[$name])) {
            return $plugins[$name];
        } else {
            return null;
        }
    }
 
    /**
     * Check to see if the current version of the plugin seems to be a checkout of an external repository.
     *
     * @param string $component frankenstyle component name
     * @return false|string
     */
    public function plugin_external_source($component) {
 
        $plugininfo = $this->get_plugin_info($component);
 
        if (is_null($plugininfo)) {
            return false;
        }
/home/user/htdocs/srv940643.hstgr.cloud/lib/classes/plugininfo/qbank.php
            $sortedqbanks[$qbankname] = $qbank[$qbankname];
        }
        return $sortedqbanks;
    }
 
    public static function get_enabled_plugins(): ?array {
        global $CFG;
        $pluginmanager = \core_plugin_manager::instance();
        $plugins = $pluginmanager->get_installed_plugins('qbank');
 
        if (!$plugins) {
            return [];
        }
 
        $plugins = array_keys($plugins);
 
        // Filter to return only enabled plugins.
        $enabled = [];
        foreach ($plugins as $plugin) {
            $qbankinfo = $pluginmanager->get_plugin_info('qbank_'.$plugin);
            $qbankavailable = $qbankinfo->get_status();
            if ($qbankavailable === \core_plugin_manager::PLUGIN_STATUS_MISSING) {
                continue;
            }
            $disabled = get_config('qbank_' . $plugin, 'disabled');
            if (empty($disabled)) {
                $enabled[$plugin] = $plugin;
            }
        }
        return $enabled;
    }
 
    public static function enable_plugin(string $pluginname, int $enabled): bool {
        $haschanged = false;
 
        $plugin = 'qbank_' . $pluginname;
        $oldvalue = get_config($plugin, 'disabled');
        $disabled = !$enabled;
        // Only set value if there is no config setting or if the value is different from the previous one.
        if ($oldvalue == false && $disabled) {
/home/user/htdocs/srv940643.hstgr.cloud/lib/classes/plugin_manager.php
            return;
        }
 
        $cache = cache::make('core', 'plugin_manager');
        $enabled = $cache->get('enabled');
 
        if (is_array($enabled)) {
            $this->enabledplugins = $enabled;
            return;
        }
 
        $this->enabledplugins = [];
 
        require_once($CFG->libdir . '/adminlib.php');
 
        $plugintypes = core_component::get_plugin_types();
        foreach ($plugintypes as $plugintype => $fulldir) {
            $plugininfoclass = static::resolve_plugininfo_class($plugintype);
            if (class_exists($plugininfoclass)) {
                $enabled = $plugininfoclass::get_enabled_plugins();
                if (!is_array($enabled)) {
                    continue;
                }
                $this->enabledplugins[$plugintype] = $enabled;
            }
        }
 
        $cache->set('enabled', $this->enabledplugins);
    }
 
    /**
     * Get list of enabled plugins of given type,
     * the result may contain missing plugins.
     *
     * @param string $type
     * @return array|null  list of enabled plugins of this type, null if unknown
     */
    public function get_enabled_plugins($type) {
        $this->load_enabled_plugins();
        if (isset($this->enabledplugins[$type])) {
/home/user/htdocs/srv940643.hstgr.cloud/lib/classes/plugin_manager.php
                $enabled = $plugininfoclass::get_enabled_plugins();
                if (!is_array($enabled)) {
                    continue;
                }
                $this->enabledplugins[$plugintype] = $enabled;
            }
        }
 
        $cache->set('enabled', $this->enabledplugins);
    }
 
    /**
     * Get list of enabled plugins of given type,
     * the result may contain missing plugins.
     *
     * @param string $type
     * @return array|null  list of enabled plugins of this type, null if unknown
     */
    public function get_enabled_plugins($type) {
        $this->load_enabled_plugins();
        if (isset($this->enabledplugins[$type])) {
            return $this->enabledplugins[$type];
        }
        return null;
    }
 
    /**
     * Load list of all present plugins - call before using $this->presentplugins.
     */
    protected function load_present_plugins() {
        if ($this->presentplugins) {
            return;
        }
 
        $cache = cache::make('core', 'plugin_manager');
        $present = $cache->get('present');
 
        if (is_array($present)) {
            $this->presentplugins = $present;
            return;
/home/user/htdocs/srv940643.hstgr.cloud/admin/tool/dataprivacy/classes/output/summary_page.php
            $purposedata = $export->export($output);
            $section['purpose'] = $purposedata;
 
            if (empty($categoryid)) {
                list($purposeid, $categoryid) =
                        \tool_dataprivacy\data_registry::get_effective_default_contextlevel_purpose_and_category($level);
            }
            if ($categoryid == -1) {
                $categoryid = 0;
            }
            $category = new \tool_dataprivacy\category($categoryid);
            $export = new \tool_dataprivacy\external\category_exporter($category, ['context' => $context]);
            $categorydata = $export->export($output);
            $section['category'] = $categorydata;
            $data['contexts'][] = $section;
        }
 
        // Get activity module plugin info.
        $pluginmanager = \core_plugin_manager::instance();
        $modplugins = $pluginmanager->get_enabled_plugins('mod');
 
        foreach ($modplugins as $name) {
            $classname = \context_helper::get_class_for_level($contextlevels['contextlevelname70']);
            list($purposevar, $categoryvar) = \tool_dataprivacy\data_registry::var_names_from_context($classname, $name);
            $categoryid = get_config('tool_dataprivacy', $categoryvar);
            $purposeid = get_config('tool_dataprivacy', $purposevar);
            if ($categoryid === false && $purposeid === false) {
                // If no purpose and category has been set for this plugin, then there's no need to show this on the list.
                continue;
            }
 
            $section = [];
            $section['contextname'] = $pluginmanager->plugin_name('mod_' . $name);
 
            if ($purposeid == -1) {
                $purposeid = 0;
            }
            $purpose = new \tool_dataprivacy\purpose($purposeid);
            $export = new \tool_dataprivacy\external\purpose_exporter($purpose, ['context' => $context]);
            $purposedata = $export->export($output);
/home/user/htdocs/srv940643.hstgr.cloud/admin/tool/dataprivacy/classes/output/renderer.php
    /**
     * Render the review page for the deletion of expired contexts.
     *
     * @param data_deletion_page $page
     * @return string html for the page
     * @throws moodle_exception
     */
    public function render_data_deletion_page(data_deletion_page $page) {
        $data = $page->export_for_template($this);
        return parent::render_from_template('tool_dataprivacy/data_deletion', $data);
    }
 
    /**
     * Render the user data retention summary page.
     *
     * @param  summary_page $page
     * @return string html for the page.
     */
    public function render_summary_page(summary_page $page) {
        $data = $page->export_for_template($this);
        return parent::render_from_template('tool_dataprivacy/summary', $data);
    }
}
 
/home/user/htdocs/srv940643.hstgr.cloud/lib/classes/output/plugin_renderer_base.php
     * @param renderable $widget instance with renderable interface
     * @return string
     */
    public function render(renderable $widget) {
        $classname = get_class($widget);
 
        // Strip namespaces.
        $classname = preg_replace('/^.*\\\/', '', $classname);
 
        // Keep a copy at this point, we may need to look for a deprecated method.
        $deprecatedmethod = "render_{$classname}";
 
        // Remove _renderable suffixes.
        $classname = preg_replace('/_renderable$/', '', $classname);
        $rendermethod = "render_{$classname}";
 
        if (method_exists($this, $rendermethod)) {
            // Call the render_[widget_name] function.
            // Note: This has a higher priority than the named_templatable to allow the theme to override the template.
            return $this->$rendermethod($widget);
        }
 
        if ($widget instanceof named_templatable) {
            // This is a named templatable.
            // Fetch the template name from the get_template_name function instead.
            // Note: This has higher priority than the deprecated method which is not overridable by themes anyway.
            return $this->render_from_template(
                $widget->get_template_name($this),
                $widget->export_for_template($this)
            );
        }
 
        if ($rendermethod !== $deprecatedmethod && method_exists($this, $deprecatedmethod)) {
            // This is exactly where we don't want to be.
            // If you have arrived here you have a renderable component within your plugin that has the name
            // blah_renderable, and you have a render method render_blah_renderable on your plugin.
            // In 2.8 we revamped output, as part of this change we changed slightly how renderables got rendered
            // and the _renderable suffix now gets removed when looking for a render method.
            // You need to change your renderers render_blah_renderable to render_blah.
            // Until you do this it will not be possible for a theme to override the renderer to override your method.
/home/user/htdocs/srv940643.hstgr.cloud/admin/tool/dataprivacy/summary.php
$url = new moodle_url('/' . $CFG->admin . '/tool/dataprivacy/summary.php');
$title = get_string('summary', 'tool_dataprivacy');
 
$context = \context_system::instance();
$PAGE->set_url($url);
$PAGE->set_context($context);
$PAGE->set_title($title);
$PAGE->set_heading($SITE->fullname);
 
// If user is logged in, then use profile navigation in breadcrumbs.
if ($profilenode = $PAGE->settingsnav->find('myprofile', null)) {
    $profilenode->make_active();
}
 
$PAGE->navbar->add($title);
 
$output = $PAGE->get_renderer('tool_dataprivacy');
echo $output->header();
$summarypage = new \tool_dataprivacy\output\summary_page();
echo $output->render($summarypage);
echo $output->footer();
 

Environment & details:

empty
empty
empty
empty
Key Value
USER stdClass Object ( [id] => 0 [mnethostid] => 1 [access] => Array ( [ra] => Array ( [/1] => Array ( [6] => 6 ) ) [time] => 1782325924 [rsw] => Array ( ) ) [enrol] => Array ( [enrolled] => Array ( ) [tempguest] => Array ( ) ) [sesskey] => Bcb0pGnWol [preference] => Array ( ) )
SESSION stdClass Object ( [isnewsessioncookie] => 1 [cachestore_session] => Array ( [default_session-core/navigation_cache] => Array ( [__lastaccess__u0_38cu26rmvo63akf5fhmdst8u8o] => Array ( [0] => 1782325924 [1] => 1782325924 ) ) [default_session-core/coursecat] => Array ( [__lastaccess__u0_38cu26rmvo63akf5fhmdst8u8o] => Array ( [0] => 1782325924 [1] => 1782325924 ) [u0_38cu26rmvo63akf5fhmdst8u8o_4ee359472e7319f8f2a395ac2ab8bea678e47ce6] => Array ( [0] => 1782325924.5849-6a3c22a48ec9c3.78240771 [1] => 1782325924 ) [u0_38cu26rmvo63akf5fhmdst8u8o_9a1ec977a969fc913c59457ebf969aad734f60c9] => Array ( [0] => Array ( ) [1] => 1782325924 ) [u0_38cu26rmvo63akf5fhmdst8u8o_7003a228799860db4b7993d330a6930c938628f3] => Array ( [0] => Array ( [0] => 1 [1] => 4 [2] => 5 [3] => 6 [4] => 7 [5] => 8 [6] => 9 [7] => 10 [8] => 11 ) [1] => 1782325924 ) ) ) )
Key Value
USER user
HOME /home/user
HTTP_ACCEPT_ENCODING gzip, br, zstd, deflate
HTTP_USER_AGENT Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
HTTP_ACCEPT */*
PATH_INFO
MGT 1
GEOIP_LONGITUDE -119.1091
GEOIP_LATITUDE 34.1453
GEOIP_CITY_CONTINENT_CODE NA
GEOIP_POSTAL_CODE 93033
GEOIP_CITY Oxnard
GEOIP_REGION CA
GEOIP_CITY_COUNTRY_NAME United States
GEOIP_CITY_COUNTRY_CODE3 USA
GEOIP_CITY_COUNTRY_CODE US
GEOIP_COUNTRY_NAME United States
GEOIP_COUNTRY_CODE3 USA
GEOIP_COUNTRY_CODE US
REDIRECT_STATUS 200
HTTP_HOST mblex.ai
HTTPS on
SERVER_NAME mblex.ai
SERVER_PORT 443
SERVER_ADDR 148.230.92.103
REMOTE_PORT 5510
REMOTE_ADDR 216.73.216.244
SERVER_SOFTWARE nginx/1.28.0
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/2.0
DOCUMENT_ROOT /home/user/htdocs/srv940643.hstgr.cloud
DOCUMENT_URI /admin/tool/dataprivacy/summary.php
REQUEST_URI /admin/tool/dataprivacy/summary.php
SCRIPT_NAME /admin/tool/dataprivacy/summary.php
SCRIPT_FILENAME /home/user/htdocs/srv940643.hstgr.cloud/admin/tool/dataprivacy/summary.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING
FCGI_ROLE RESPONDER
PHP_SELF /admin/tool/dataprivacy/summary.php
REQUEST_TIME_FLOAT 1782325924.4464
REQUEST_TIME 1782325924
empty
0. Whoops\Handler\PrettyPageHandler
1. Whoops\Handler\CallbackHandler