示例#1
0
                    echo $OUTPUT->box_end();
                }
                echo $OUTPUT->continue_button('index.php?confirmupgrade=1&confirmrelease=1');
            }
            echo $OUTPUT->footer();
            die;
        } elseif (empty($confirmplugins)) {
            $strplugincheck = get_string('plugincheck');
            $navigation = build_navigation(array(array('name' => $strplugincheck, 'link' => null, 'type' => 'misc')));
            print_header($strplugincheck, $strplugincheck, $navigation, '', '', false, ' ', ' ');
            echo $OUTPUT->heading($strplugincheck);
            echo $OUTPUT->box_start('generalbox', 'notice');
            print_string('pluginchecknotice');
            echo $OUTPUT->box_end();
            print_plugin_tables();
            print_upgrade_reload('index.php?confirmupgrade=1&confirmrelease=1');
            echo $OUTPUT->continue_button('index.php?confirmupgrade=1&confirmrelease=1&confirmplugincheck=1');
            echo $OUTPUT->footer();
            die;
        } else {
            // Launch main upgrade
            upgrade_core($version, true);
        }
    }
} else {
    if ($version < $CFG->version) {
        echo $OUTPUT->notification('WARNING!!!  The code you are using is OLDER than the version that made these databases!');
    }
}
// Updated human-readable release version if necessary
if ($release != $CFG->release) {
示例#2
0
文件: index.php 项目: nfreear/moodle
        if (!$confirmplugins) {
            $PAGE->set_pagelayout('maintenance');
            $PAGE->set_popup_notification_allowed(false);
            $strplugincheck = get_string('plugincheck');
            $PAGE->navbar->add($strplugincheck);
            $PAGE->set_title($strplugincheck);
            $PAGE->set_heading($strplugincheck);
            $PAGE->set_cacheable(false);
            $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();
            die;
        }
    }
    // install/upgrade all plugins and other parts
    upgrade_noncore(true);
}
// If this is the first install, indicate that this site is fully configured
// except the admin password
if (during_initial_install()) {
    set_config('rolesactive', 1);
    // after this, during_initial_install will return false.