MDL-39148 Highlight plugin status at the overview screen

Plugins that are to be installed and plugins that are missing from disk
are now highlighted at the Plugins overview screen. Other statuses (such as
of plugin to be upgraded) should not be needed at this page as those
are primarily intended for the Plugins checks screen during the upgrade.
This commit is contained in:
David Mudrák
2013-04-19 13:21:39 +02:00
parent badf464792
commit 9074e47871
5 changed files with 36 additions and 6 deletions
+6 -3
View File
@@ -1179,9 +1179,12 @@ class core_admin_renderer extends plugin_renderer_base {
} else {
$icon = $this->output->pix_icon('spacer', '', 'moodle', array('class' => 'icon pluginicon noicon'));
}
if ($plugin->get_status() === plugin_manager::PLUGIN_STATUS_MISSING) {
$msg = html_writer::tag('span', get_string('status_missing', 'core_plugin'), array('class' => 'notifyproblem'));
$row->attributes['class'] .= ' missingfromdisk';
$status = $plugin->get_status();
$row->attributes['class'] .= ' status-'.$status;
if ($status === plugin_manager::PLUGIN_STATUS_MISSING) {
$msg = html_writer::tag('span', get_string('status_missing', 'core_plugin'), array('class' => 'statusmsg'));
} else if ($status === plugin_manager::PLUGIN_STATUS_NEW) {
$msg = html_writer::tag('span', get_string('status_new', 'core_plugin'), array('class' => 'statusmsg'));
} else {
$msg = '';
}