Help w/ mod to print_simple_box function

Doh! - here's a fixed version of the fancy highlighting in the code example

by Bill Jones -
Number of replies: 0

In /moodle/mod/resource/type/html/resource.class.php around line 160

print_special_box(format_text($resource->alltext, FORMAT_HTML, $formatoptions, $course->id), "center", "700", "", "20", $resource->name);

In /moodle/lib/weblib.php around line 2600
* MODIFICATION - add import of resource->name as $documentname and display in top of table
* See, {@link print_simple_box_start}.
*
* @param string $align string, alignment of the box, not the text (default center, left, right).
* @param string $width string, width of the box, including units %, for example '100%'.
* @param string $color string, background colour of the box, for example '#eee'.
* @param int $padding integer, padding in pixels, specified without units.
* @param string $class string, space-separated class names.
* @todo Finish documenting this function
*/
function print_special_box($message, $align='', $width='', $color='', $padding=5, $class='generalbox', $id='', $documentname='') {
print_special_box_start($align, $width, $color, $padding, $class, $id, $documentname);
echo stripslashes_safe($message);
print_special_box_end();
}

/**
* Print the top portion of a standard themed box using a TABLE. Yes, we know.
* See bug 4943 for details on some accessibility work regarding this that didn't make it into 1.6.
*
* @param string $align string, alignment of the box, not the text (default center, left, right).
* @param string $width string, width of the box, including % units, for example '100%'.
* @param string $color string, background colour of the box, for example '#eee'.
* @param int $padding integer, padding in pixels, specified without units.
* @param string $class string, space-separated class names.
*/
function print_special_box_start($align='', $width='', $color='', $padding=5, $class='generalbox', $id='', $documentname='') {

if ($color) {
$color = 'bgcolor="'. $color .'"';
}
if ($align) {
$align = 'align="'. $align .'"';
}
if ($width) {
$width = 'width="'. $width .'"';
}
if ($id) {
$id = 'id="'. $id .'"';
}

echo "<table $align $width $id class=\"$class\" border=\"0\" cellpadding=\"$padding\" cellspacing=\"0\">".
"<tr><td $color class=\"$class"."content\">".
"<h1>".$documentname."</h1>";