Alternatively, you can probably hide the link by adding an appropriate display: none; rule to the stylesheet in your theme.
Another option to remove the link would be to edit the print_error() function in lib/weblib.php (1.9) or lib/outputlib.php (2.0)
I found the best solution for me was to modify the weblib.php file as Alberto suggested.
I removed the following code from lib/weblib.php and that removed the "More information about this error" link.
$message = clean_text('<p class="errormessage">'.$message.'</p>'.
'<p class="errorcode">'.
'<a href="'.$errordocroot.'/en/error/'.$modulelink.'/'.$errorcode.'">'.
get_string('moreinformation').'</a></p>');
Hi AlbertoJV
I hope you can help please. I wish to remove the above message I have tried to follow your instructions but assume I am in a different version as I can't locate the code anywhere, in the files you mention.- can you advise where I can access the correct code in moodle 2.0.8+ please?
Regards sarah x
FILE:
/lib/outputrenderers.php
FIND:
$message = '<p class="errormessage">' . $message . '</p>'.
'<p class="errorcode"><a href="' . $moreinfourl . '">' .
get_string('moreinformation') . '</a></p>';
$output .= $this->box($message, 'errorbox');
REMOVE the red bit!
Use notepad or notepad++ to do it, MS-word will mess it up!
A better way to do that without hacking Moodle core code is to define the following in your theme:
.errorcode {display:none}
I think it depends what people prefer.
I prefer removing than hidding it .
Is there an overide system in moodle??? something like vqmod
Re: Remove the "More information about this error" link
Which part of the theme should I put this code in?
Will this method stop all error messages or a specific error message?
Thanks
Re: Remove the "More information about this error" link
Add Rex's suggestion to your theme customcss (the other alternatives suggested that involve hacking core will cause problems on any upgrade).
Don't forget to purge all caches
It will affect any item (error message) with the class suggested by Rex. If you find any others, then add that class selector (use firebug or browser developer tools to find the relevant class) in the same way.
Re: Remove the "More information about this error" link
Thanks Richard.
I like this method as it's upgrade friendly.