]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed up print_error according to original plan
authormoodler <moodler>
Wed, 12 Apr 2006 09:32:19 +0000 (09:32 +0000)
committermoodler <moodler>
Wed, 12 Apr 2006 09:32:19 +0000 (09:32 +0000)
   see also http://moodle.org/mod/forum/discuss.php?d=43712

lib/weblib.php

index b88019fc9e83b4953efd05a75a644613665a018c..f301307efe4056fb547716f1a032e51cd76bea94 100644 (file)
@@ -4033,13 +4033,14 @@ function error ($message, $link='') {
  *
  * @uses $SESSION
  * @uses $CFG
- * @param string $string The name of the string from error.php to print
+ * @param string $errorcode The name of the string from error.php to print
  * @param string $link The url where the user will be prompted to continue. If no url is provided the user will be directed to the site index page.
  */
-function print_error ($string, $link='') {
+function print_error ($errorcode, $link='') {
 
-    $string = get_string($string, 'error');
-    error($string, $link);
+    $message = get_string($errorcode, 'error').
+               '<p class="code">(<a href="http://docs.moodle.org/en/error/'.$errorcode.'">'.$errorcode.'</a>)</p>';
+    error($message, $link);
 }