Commit 63c45034 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Print error to screen on plugins page when an installed plugin is missing (bug #629209)



Change-Id: I8b0e1d7ef1b5daf14710d5adfada2e03ce9cf949
Signed-off-by: default avatarRichard Mansfield <richard.mansfield@catalyst.net.nz>
parent eeb615aa
......@@ -55,7 +55,13 @@ foreach (array_keys($plugins) as $plugin) {
if ($plugin == 'blocktype') {
$key = blocktype_single_to_namespaced($i->name, $i->artefactplugin);
}
safe_require($plugin, $key);
try {
safe_require($plugin, $key);
}
catch (SystemException $e) {
$message = get_string('missingplugin', 'admin', hsc("$plugin:$key")) . ':<br>' . $e->getMessage();
die_info($message);
}
$plugins[$plugin]['installed'][$key] = array(
'active' => $i->active,
'disableable' => call_static_method(generate_class_name($plugin, $key), 'can_be_disabled'),
......
......@@ -118,6 +118,7 @@ $string['institutionfilesdescription'] = 'Upload and manage files for use in Ins
$string['pluginadmin'] = 'Plugin Administration';
$string['pluginadmindescription'] = 'Install and configure plugins';
$string['missingplugin'] = 'An installed plugin (%s) could not be found';
$string['htmlfilters'] = 'HTML Filters';
$string['htmlfiltersdescription'] = 'Enable new filters for HTML Purifier';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment