From ce5f45783e258f3f0e459f996a65644ddd414bf6 Mon Sep 17 00:00:00 2001 From: tjhunt Date: Fri, 27 Apr 2007 17:43:03 +0000 Subject: [PATCH] MDL-9616 - tidy up * add a better message in the table for these checks. * improve existing strings for other types of check. * remove a line of debug code. --- lang/en_utf8/admin.php | 10 ++++++---- lib/environmentlib.php | 7 ++++++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/lang/en_utf8/admin.php b/lang/en_utf8/admin.php index cebc20505d..e8ccfaa77a 100644 --- a/lang/en_utf8/admin.php +++ b/lang/en_utf8/admin.php @@ -277,9 +277,11 @@ $string['environment'] = 'Environment'; $string['environmenterrortodo'] = 'You must solve all the environmental problems (errors) found above before proceeding to install this Moodle version!'; $string['environmenterrorupgrade'] = 'Warning: you should solve all the environmental problems (errors) found above before proceeding to upgrade this Moodle version! Upgrading without fixing these requirements could cause problems such as data loss. Are you sure you want to continue with the upgrade?'; $string['environmentok'] = 'Your server environment meets all minimum requirements.'; -$string['environmentrecommendinstall'] = 'is recommended to be installed/enabled'; +$string['environmentrecommendcustomcheck'] = 'if this test fails, it indicates a potential problem'; +$string['environmentrecommendinstall'] = 'should be installed and enabled for best results'; $string['environmentrecommendversion'] = 'version $a->needed is recommended and you are running $a->current'; -$string['environmentrequireinstall'] = 'is required to be installed/enabled.'; +$string['environmentrequirecustomcheck'] = 'this test must pass'; +$string['environmentrequireinstall'] = 'must be installed and enabled'; $string['environmentrequireversion'] = 'version $a->needed is required and you are running $a->current'; $string['environmentxmlerror'] = 'Error reading environment data ($a->error_code)'; $string['errors'] = 'Errors'; @@ -506,8 +508,8 @@ $string['riskspamshort'] = 'Spam risk'; $string['riskxss'] = 'Users could add files and texts that allow cross-site scripting (XSS)'; $string['riskxssshort'] = 'XSS risk'; $string['runclamavonupload'] = 'Use clam AV on uploaded files'; -$string['qtyperqpwillberemoved'] = 'During the upgrade, the RQP question type will be removed. You were not using this quetsion type, so this should not cause you any problems.'; -$string['qtyperqpwillberemovedanyway'] = 'During the upgrade, the RQP question type will be removed. You have some RQP questions in your database, and these will stop working unless you reinstall the code from http://moodle.org/mod/data/view.php?d=13&rid=797 before continuing with the upgrade.'; +$string['qtyperqpwillberemoved'] = 'During the upgrade, the RQP question type will be removed. You were not using this question type, so you should not experience any problems.'; +$string['qtyperqpwillberemovedanyway'] = 'During the upgrade, the RQP question type will be removed. You have some RQP questions in your database, and these will stop working unless you reinstall the code from http://moodle.org/mod/data/view.php?d=13&rid=797 before continuing with the upgrade.'; $string['savechanges'] = 'Save Changes'; $string['search'] = 'Search'; $string['searchresults'] = 'Search Results'; diff --git a/lib/environmentlib.php b/lib/environmentlib.php index 7c02f77e5c..6f59e64848 100644 --- a/lib/environmentlib.php +++ b/lib/environmentlib.php @@ -177,6 +177,12 @@ function print_moodle_environment($result, $environment_results) { $stringtouse = 'environmentrecommendversion'; } /// We are checking installed & enabled things + } else if ($environment_result->getPart() == 'custom_check') { + if ($environment_result->getLevel() == 'required') { + $stringtouse = 'environmentrequirecustomcheck'; + } else { + $stringtouse = 'environmentrecommendcustomcheck'; + } } else { if ($environment_result->getLevel() == 'required') { $stringtouse = 'environmentrequireinstall'; @@ -505,7 +511,6 @@ function environment_custom_checks($version) { /// Check for extension name if (isset($check['@']['file']) && isset($check['@']['function'])) { $file = $CFG->dirroot . '/' . $check['@']['file']; - echo $file; $function = $check['@']['function']; if (is_readable($file)) { include_once($file); -- 2.39.5