MDL-35238 Inform the admin if the update can not be deployed due to write permissions

This commit is contained in:
David Mudrák
2012-11-09 00:20:18 +01:00
parent d80f80f386
commit 0daa642894
4 changed files with 97 additions and 14 deletions
+8 -3
View File
@@ -1206,9 +1206,14 @@ class core_admin_renderer extends plugin_renderer_base {
$box .= $this->output->box(implode(html_writer::tag('span', ' ', array('class' => 'separator')), $info), '');
$deployer = available_update_deployer::instance();
if ($deployer->initialized() and $deployer->can_deploy($updateinfo)) {
$widget = $deployer->make_confirm_widget($updateinfo);
$box .= $this->output->render($widget);
if ($deployer->initialized()) {
$impediments = $deployer->deployment_impediments($updateinfo);
if (empty($impediments)) {
$widget = $deployer->make_confirm_widget($updateinfo);
$box .= $this->output->render($widget);
} else if (isset($impediments['notwritable'])) {
$box .= $this->output->help_icon('notwritable', 'core_plugin', get_string('notwritable', 'core_plugin'));
}
}
$box .= $this->output->box_end();