MDL-39087 Improve the Plugins overview renderer

As suggested by Tim Hunt during the peer-review, rendering methods
should not set properties of the page they are producing HTML code for.
Additionally, the page now uses correct check that the uninstalling can
happen.
This commit is contained in:
David Mudrák
2013-04-12 03:32:35 +02:00
parent ccc6c15fd2
commit c2d2001a14
2 changed files with 22 additions and 14 deletions
-9
View File
@@ -384,9 +384,6 @@ class core_admin_renderer extends plugin_renderer_base {
$pluginname = $pluginman->plugin_name($pluginfo->component);
$this->page->set_title($pluginname);
$this->page->navbar->add(get_string('uninstalling', 'core_plugin', array('name' => $pluginname)));
$output .= $this->output->header();
$output .= $this->output->heading(get_string('uninstalling', 'core_plugin', array('name' => $pluginname)));
$output .= $this->output->confirm(get_string('uninstallconfirm', 'core_plugin', array('name' => $pluginname)),
@@ -411,9 +408,6 @@ class core_admin_renderer extends plugin_renderer_base {
$pluginname = $pluginman->plugin_name($pluginfo->component);
$this->page->set_title($pluginname);
$this->page->navbar->add(get_string('uninstalling', 'core_plugin', array('name' => $pluginname)));
$output .= $this->output->header();
$output .= $this->output->heading(get_string('uninstalling', 'core_plugin', array('name' => $pluginname)));
@@ -448,9 +442,6 @@ class core_admin_renderer extends plugin_renderer_base {
$pluginname = $pluginman->plugin_name($pluginfo->component);
$this->page->set_title($pluginname);
$this->page->navbar->add(get_string('uninstalling', 'core_plugin', array('name' => $pluginname)));
$output .= $this->output->header();
$output .= $this->output->heading(get_string('uninstalling', 'core_plugin', array('name' => $pluginname)));