mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 13:02:07 +02:00
MDL-50325 core: Use plugins API to check module status.
This commit is contained in:
parent
8c51626841
commit
7cdd97b252
@ -87,9 +87,13 @@
|
||||
$table->set_attribute('class', 'admintable generaltable');
|
||||
$table->setup();
|
||||
|
||||
foreach ($modules as $module) {
|
||||
$pluginmanager = core_plugin_manager::instance();
|
||||
|
||||
if (!file_exists("$CFG->dirroot/mod/$module->name/lib.php")) {
|
||||
foreach ($modules as $module) {
|
||||
$plugininfo = $pluginmanager->get_plugin_info('mod_'.$module->name);
|
||||
$status = $plugininfo->get_status();
|
||||
|
||||
if ($status === core_plugin_manager::PLUGIN_STATUS_MISSING) {
|
||||
$strmodulename = '<span class="notifyproblem">'.$module->name.' ('.get_string('missingfromdisk').')</span>';
|
||||
$missing = true;
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user