Index: help.php =================================================================== RCS file: /cvsroot/moodle/moodle/help.php,v retrieving revision 1.45 diff -u -r1.45 help.php --- help.php 4 Apr 2008 02:54:20 -0000 1.45 +++ help.php 9 Apr 2008 14:31:48 -0000 @@ -20,15 +20,14 @@ $forcelang = optional_param('forcelang', '', PARAM_SAFEDIR); $skiplocal = optional_param('skiplocal', 0, PARAM_INT); // shall _local help files be skipped? -// Start the output. -print_header(get_string('help')); -print_simple_box_start(); - // We look for the help to display in lots of different places, and // only display an error at the end if we can't find the help file // anywhere. This variable tracks that. $helpfound = false; +// Buffer output so that we can examine it later to extract metadata (page title) +ob_start(); + if (!empty($file)) { // The help to display is from a help file. @@ -118,6 +117,33 @@ $helpfound = true; } +// Finish buffer +$output=ob_get_contents(); +ob_end_clean(); + +// Determine title +$title=get_string('help'); // Default is just 'Help' +$matches=array(); +// You can include a