mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 17:06:53 +02:00
Merge branch 'MDL-52319-master-environmentxml' of git://github.com/mudrd8mz/moodle
This commit is contained in:
commit
6eb9705154
2 changed files with 33 additions and 9 deletions
|
@ -226,7 +226,7 @@ if (!core_tables_exist()) {
|
||||||
}
|
}
|
||||||
if (empty($confirmrelease)) {
|
if (empty($confirmrelease)) {
|
||||||
require_once($CFG->libdir.'/environmentlib.php');
|
require_once($CFG->libdir.'/environmentlib.php');
|
||||||
list($envstatus, $environment_results) = check_moodle_environment(normalize_version($release), ENV_SELECT_RELEASE);
|
list($envstatus, $environmentresults) = check_moodle_environment(normalize_version($release), ENV_SELECT_RELEASE);
|
||||||
$strcurrentrelease = get_string('currentrelease');
|
$strcurrentrelease = get_string('currentrelease');
|
||||||
|
|
||||||
$PAGE->navbar->add($strcurrentrelease);
|
$PAGE->navbar->add($strcurrentrelease);
|
||||||
|
@ -235,7 +235,7 @@ if (!core_tables_exist()) {
|
||||||
$PAGE->set_cacheable(false);
|
$PAGE->set_cacheable(false);
|
||||||
|
|
||||||
$output = $PAGE->get_renderer('core', 'admin');
|
$output = $PAGE->get_renderer('core', 'admin');
|
||||||
echo $output->install_environment_page($maturity, $envstatus, $environment_results, $release);
|
echo $output->install_environment_page($maturity, $envstatus, $environmentresults, $release);
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -358,9 +358,9 @@ if (!$cache and $version > $CFG->version) { // upgrade
|
||||||
echo $output->upgrade_confirm_page($a->newversion, $maturity, $testsite);
|
echo $output->upgrade_confirm_page($a->newversion, $maturity, $testsite);
|
||||||
die();
|
die();
|
||||||
|
|
||||||
} else if (empty($confirmrelease)){
|
} else if (empty($confirmrelease)) {
|
||||||
require_once($CFG->libdir.'/environmentlib.php');
|
require_once($CFG->libdir.'/environmentlib.php');
|
||||||
list($envstatus, $environment_results) = check_moodle_environment($release, ENV_SELECT_RELEASE);
|
list($envstatus, $environmentresults) = check_moodle_environment($release, ENV_SELECT_RELEASE);
|
||||||
$strcurrentrelease = get_string('currentrelease');
|
$strcurrentrelease = get_string('currentrelease');
|
||||||
|
|
||||||
$PAGE->navbar->add($strcurrentrelease);
|
$PAGE->navbar->add($strcurrentrelease);
|
||||||
|
@ -368,7 +368,7 @@ if (!$cache and $version > $CFG->version) { // upgrade
|
||||||
$PAGE->set_heading($strcurrentrelease);
|
$PAGE->set_heading($strcurrentrelease);
|
||||||
$PAGE->set_cacheable(false);
|
$PAGE->set_cacheable(false);
|
||||||
|
|
||||||
echo $output->upgrade_environment_page($release, $envstatus, $environment_results);
|
echo $output->upgrade_environment_page($release, $envstatus, $environmentresults);
|
||||||
die();
|
die();
|
||||||
|
|
||||||
} else if (empty($confirmplugins)) {
|
} else if (empty($confirmplugins)) {
|
||||||
|
@ -533,7 +533,10 @@ if (!$cache and $branch <> $CFG->branch) { // Update the branch
|
||||||
|
|
||||||
if (!$cache and moodle_needs_upgrading()) {
|
if (!$cache and moodle_needs_upgrading()) {
|
||||||
|
|
||||||
$PAGE->set_url(new moodle_url($PAGE->url, array('confirmplugincheck' => $confirmplugins)));
|
$PAGE->set_url(new moodle_url($PAGE->url, array(
|
||||||
|
'confirmrelease' => $confirmrelease,
|
||||||
|
'confirmplugincheck' => $confirmplugins,
|
||||||
|
)));
|
||||||
|
|
||||||
check_upgrade_key($upgradekeyhash);
|
check_upgrade_key($upgradekeyhash);
|
||||||
|
|
||||||
|
@ -543,7 +546,21 @@ if (!$cache and moodle_needs_upgrading()) {
|
||||||
$pluginman = core_plugin_manager::instance();
|
$pluginman = core_plugin_manager::instance();
|
||||||
$output = $PAGE->get_renderer('core', 'admin');
|
$output = $PAGE->get_renderer('core', 'admin');
|
||||||
|
|
||||||
if (!$confirmplugins) {
|
if (empty($confirmrelease)) {
|
||||||
|
require_once($CFG->libdir . '/environmentlib.php');
|
||||||
|
|
||||||
|
list($envstatus, $environmentresults) = check_moodle_environment($release, ENV_SELECT_RELEASE);
|
||||||
|
$strcurrentrelease = get_string('currentrelease');
|
||||||
|
|
||||||
|
$PAGE->navbar->add($strcurrentrelease);
|
||||||
|
$PAGE->set_title($strcurrentrelease);
|
||||||
|
$PAGE->set_heading($strcurrentrelease);
|
||||||
|
$PAGE->set_cacheable(false);
|
||||||
|
|
||||||
|
echo $output->upgrade_environment_page($release, $envstatus, $environmentresults);
|
||||||
|
die();
|
||||||
|
|
||||||
|
} else if (!$confirmplugins) {
|
||||||
$strplugincheck = get_string('plugincheck');
|
$strplugincheck = get_string('plugincheck');
|
||||||
|
|
||||||
$PAGE->navbar->add($strplugincheck);
|
$PAGE->navbar->add($strplugincheck);
|
||||||
|
@ -802,7 +819,7 @@ $SESSION->admin_critical_warning = ($insecuredataroot==INSECURE_DATAROOT_ERROR);
|
||||||
$adminroot = admin_get_root();
|
$adminroot = admin_get_root();
|
||||||
|
|
||||||
// Check if there are any new admin settings which have still yet to be set
|
// Check if there are any new admin settings which have still yet to be set
|
||||||
if (any_new_admin_settings($adminroot)){
|
if (any_new_admin_settings($adminroot)) {
|
||||||
redirect('upgradesettings.php');
|
redirect('upgradesettings.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -140,6 +140,7 @@ function environment_get_errors($environment_results) {
|
||||||
$type = $environment_result->getPart();
|
$type = $environment_result->getPart();
|
||||||
$info = $environment_result->getInfo();
|
$info = $environment_result->getInfo();
|
||||||
$status = $environment_result->getStatus();
|
$status = $environment_result->getStatus();
|
||||||
|
$plugin = $environment_result->getPluginName();
|
||||||
$error_code = $environment_result->getErrorCode();
|
$error_code = $environment_result->getErrorCode();
|
||||||
|
|
||||||
$a = new stdClass();
|
$a = new stdClass();
|
||||||
|
@ -209,7 +210,13 @@ function environment_get_errors($environment_results) {
|
||||||
// Append the restrict if there is some
|
// Append the restrict if there is some
|
||||||
$feedbacktext .= $environment_result->strToReport($environment_result->getRestrictStr(), 'error');
|
$feedbacktext .= $environment_result->strToReport($environment_result->getRestrictStr(), 'error');
|
||||||
|
|
||||||
$report .= html_to_text($feedbacktext);
|
if ($plugin === '') {
|
||||||
|
$report = '[' . get_string('coresystem') . '] ' . $report;
|
||||||
|
} else {
|
||||||
|
$report = '[' . $plugin . '] ' . $report;
|
||||||
|
}
|
||||||
|
|
||||||
|
$report .= ' - ' . html_to_text($feedbacktext);
|
||||||
|
|
||||||
if ($environment_result->getPart() == 'custom_check'){
|
if ($environment_result->getPart() == 'custom_check'){
|
||||||
$errors[] = array($info, $report);
|
$errors[] = array($info, $report);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue