MDL-9616 - tidy up
authortjhunt <tjhunt>
Fri, 27 Apr 2007 17:43:03 +0000 (17:43 +0000)
committertjhunt <tjhunt>
Fri, 27 Apr 2007 17:43:03 +0000 (17:43 +0000)
* 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
lib/environmentlib.php

index cebc20505df0a7a6eae649dddcb909efef88dabe..e8ccfaa77a3aece342c78d247b80cb17fec7d24d 100644 (file)
@@ -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&amp;rid=797 before continuing with the upgrade.';
 $string['savechanges'] = 'Save Changes';
 $string['search'] = 'Search';
 $string['searchresults'] = 'Search Results';
index 7c02f77e5c9d4d56a4ad77e304ac13b6e5177fb3..6f59e64848ea0fab741674d8883b28d30388cd63 100644 (file)
@@ -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);