Permalink
Browse files

Merge branch 'MDL-26784-plugin-manager' of git://github.com/mudrd8mz/…

…moodle
  • Loading branch information...
skodak committed Apr 4, 2011
2 parents 656d17c + 91dedc3 commit 33620e1772fb9050d66a45d8dd7333098c3b22ce
View
@@ -48,6 +48,7 @@
$confirmupgrade = optional_param('confirmupgrade', 0, PARAM_BOOL);
$confirmrelease = optional_param('confirmrelease', 0, PARAM_BOOL);
$confirmplugins = optional_param('confirmplugincheck', 0, PARAM_BOOL);
+$showallplugins = optional_param('showallplugins', 0, PARAM_BOOL);
$agreelicense = optional_param('agreelicense', 0, PARAM_BOOL);
// Check some PHP server settings
@@ -255,17 +256,19 @@
$PAGE->set_title($strplugincheck);
$PAGE->set_heading($strplugincheck);
$PAGE->set_cacheable(false);
- echo $OUTPUT->header();
- echo $OUTPUT->heading($strplugincheck);
- echo $OUTPUT->box_start('generalbox', 'notice');
- print_string('pluginchecknotice');
- echo $OUTPUT->box_end();
- print_plugin_tables();
+ $output = $PAGE->get_renderer('core', 'admin');
+ $pluginman = plugin_manager::instance();
+
+ echo $output->header();
+ echo $output->box_start('generalbox');
+ echo $output->container(get_string('pluginchecknotice', 'core_plugin'), 'generalbox', 'notice');
+ echo $output->plugins_check($pluginman->get_plugins(), array('full' => $showallplugins));
+ echo $output->box_end();
print_upgrade_reload('index.php?confirmupgrade=1&confirmrelease=1');
$button = new single_button(new moodle_url('index.php', array('confirmupgrade'=>1, 'confirmrelease'=>1, 'confirmplugincheck'=>1)), get_string('upgradestart', 'admin'), 'get');
$button->class = 'continuebutton';
- echo $OUTPUT->render($button);
- echo $OUTPUT->footer();
+ echo $output->render($button);
+ echo $output->footer();
die();
} else {
@@ -293,17 +296,19 @@
$PAGE->set_title($strplugincheck);
$PAGE->set_heading($strplugincheck);
$PAGE->set_cacheable(false);
- echo $OUTPUT->header();
- echo $OUTPUT->heading($strplugincheck);
- echo $OUTPUT->box_start('generalbox', 'notice');
- print_string('pluginchecknotice');
- echo $OUTPUT->box_end();
- print_plugin_tables();
+ $output = $PAGE->get_renderer('core', 'admin');
+ $pluginman = plugin_manager::instance();
+
+ echo $output->header();
+ echo $output->box_start('generalbox');
+ echo $output->container(get_string('pluginchecknotice', 'core_plugin'), 'generalbox', 'notice');
+ echo $output->plugins_check($pluginman->get_plugins(), array('full' => $showallplugins));
+ echo $output->box_end();
print_upgrade_reload('index.php');
$button = new single_button(new moodle_url('index.php', array('confirmplugincheck'=>1)), get_string('upgradestart', 'admin'), 'get');
$button->class = 'continuebutton';
- echo $OUTPUT->render($button);
- echo $OUTPUT->footer();
+ echo $output->render($button);
+ echo $output->footer();
die();
}
}
View
@@ -0,0 +1,41 @@
+<?php
+
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * UI for general plugins management
+ *
+ * @package core
+ * @subpackage admin
+ * @copyright 2011 David Mudrak <david@moodle.com>
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+require_once(dirname(dirname(__FILE__)) . '/config.php');
+require_once($CFG->libdir . '/adminlib.php');
+require_once($CFG->libdir . '/pluginlib.php');
+
+require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM));
+admin_externalpage_setup('pluginsoverview');
+$output = $PAGE->get_renderer('core', 'admin');
+$pluginman = plugin_manager::instance();
+
+echo $output->header();
+echo $output->heading(get_string('pluginsoverview', 'core_admin'));
+echo $output->box_start('generalbox');
+echo $output->plugins_control_panel($pluginman->get_plugins());
+echo $output->box_end();
+echo $output->footer();
Oops, something went wrong.

0 comments on commit 33620e1

Please sign in to comment.