mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 17:06:53 +02:00
MDL-41437 rework plugin_manager caching and version info in blocks and modules
This patch includes: * version column removed from modules table, now using standard config, this allows decimal version for modules * version column removed from block table, now using standard config, this allows decimal version for blocks * module version.php can safely use $plugins instead of module * new plugin_manager bulk caching, this should help with MUC performance when logged in as admin * all missing plugins are now in plugin overview (previously only blocks and modules) * simplified code and improved coding style * reworked plugin_manager unit tests - now using real plugins instead of mocks * unit tests now fail if any plugin does not contain proper version.php file * allow uninstall of deleted filters
This commit is contained in:
parent
81881cb9d6
commit
bde002b81a
50 changed files with 1601 additions and 1940 deletions
|
@ -5,6 +5,7 @@
|
|||
require_once('../course/lib.php');
|
||||
require_once($CFG->libdir.'/adminlib.php');
|
||||
require_once($CFG->libdir.'/tablelib.php');
|
||||
require_once($CFG->libdir.'/pluginlib.php');
|
||||
|
||||
// defines
|
||||
define('MODULE_TABLE','module_administration_table');
|
||||
|
@ -27,9 +28,6 @@
|
|||
$stractivitymodule = get_string("activitymodule");
|
||||
$strshowmodulecourse = get_string('showmodulecourse');
|
||||
|
||||
// Purge all caches related to activity modules administration.
|
||||
cache::make('core', 'plugininfo_mod')->purge();
|
||||
|
||||
/// If data submitted, then process and store.
|
||||
|
||||
if (!empty($hide) and confirm_sesskey()) {
|
||||
|
@ -50,6 +48,7 @@
|
|||
FROM {course_modules}
|
||||
WHERE visibleold=1 AND module=?)",
|
||||
array($module->id));
|
||||
plugin_manager::reset_caches();
|
||||
admin_get_root(true, false); // settings not required - only pages
|
||||
}
|
||||
|
||||
|
@ -66,6 +65,7 @@
|
|||
FROM {course_modules}
|
||||
WHERE visible=1 AND module=?)",
|
||||
array($module->id));
|
||||
plugin_manager::reset_caches();
|
||||
admin_get_root(true, false); // settings not required - only pages
|
||||
}
|
||||
|
||||
|
@ -143,12 +143,12 @@
|
|||
$visible = "";
|
||||
$class = "";
|
||||
}
|
||||
|
||||
$version = get_config('mod_'.$module->name, 'version');
|
||||
|
||||
$table->add_data(array(
|
||||
'<span'.$class.'>'.$strmodulename.'</span>',
|
||||
$countlink,
|
||||
'<span'.$class.'>'.$module->version.'</span>',
|
||||
'<span'.$class.'>'.$version.'</span>',
|
||||
$visible,
|
||||
$uninstall,
|
||||
$settings
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue