Skip to content
Snippets Groups Projects
Commit a8808aca authored by Thomas Marstrander's avatar Thomas Marstrander
Browse files

Fix not loading core unless settings is expanded

parent 0b6a1af7
No related branches found
No related tags found
No related merge requests found
......@@ -29,9 +29,6 @@ require_once($CFG->dirroot . '/mod/hvp/classes/admin_setting_html.php');
global $PAGE;
// Make sure core is loaded.
$core = \mod_hvp\framework::instance('core');
// Redefine the H5P admin menu entry to be expandable.
$modltifolder = new admin_category('modhvpfolder', new lang_string('pluginname', 'mod_hvp'), $module->is_enabled() === false);
// Add the Settings admin menu entry.
......@@ -43,6 +40,9 @@ $ADMIN->add('modhvpfolder', new admin_externalpage('h5plibraries',
get_string('libraries', 'hvp'), new moodle_url('/mod/hvp/library_list.php')));
if ($ADMIN->fulltree) {
// Make sure core is loaded.
$core = \mod_hvp\framework::instance('core');
// Settings is stored on the global $CFG object.
// Content state.
......@@ -141,7 +141,6 @@ if ($ADMIN->fulltree) {
}
// Find missing requirements.
$core = \mod_hvp\framework::instance('core');
$errors = $core->checkSetupErrorMessage()->errors;
$PAGE->requires->data_for_js('H5PDisableHubData', array(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment