2002-08-18 16:31:23 +00:00
|
|
|
<?PHP // $Id$
|
|
|
|
|
|
|
|
require("../config.php");
|
|
|
|
|
2002-10-29 14:48:58 +00:00
|
|
|
optional_variable($id); // course context
|
2002-08-18 16:31:23 +00:00
|
|
|
require_variable($file); // file in this directory to view
|
|
|
|
|
2002-10-29 14:48:58 +00:00
|
|
|
$file = clean_filename($file);
|
2002-08-18 16:31:23 +00:00
|
|
|
|
2002-10-29 14:48:58 +00:00
|
|
|
if ($id) {
|
|
|
|
if (! $course = get_record("course", "id", $id)) {
|
|
|
|
error("Course is misconfigured");
|
|
|
|
}
|
2002-08-18 16:31:23 +00:00
|
|
|
$strhelp = get_string("help");
|
|
|
|
print_header("$course->shortname: $strhelp", "$course->fullname",
|
|
|
|
"<A HREF=\"../course/view.php?id=$course->id\">$course->shortname</A> -> $strhelp");
|
2002-10-29 14:48:58 +00:00
|
|
|
} else {
|
|
|
|
if (! $site = get_site()) {
|
|
|
|
error("Site is misconfigured");
|
|
|
|
}
|
|
|
|
$strdocumentation = get_string("documentation");
|
|
|
|
print_header("$site->shortname: $strhelp", "$site->fullname",
|
|
|
|
"<A HREF=\"view.php?file=contents.html\">$strdocumentation</A>");
|
|
|
|
|
2002-08-18 16:31:23 +00:00
|
|
|
}
|
2002-12-29 14:39:52 +00:00
|
|
|
|
2002-10-29 14:48:58 +00:00
|
|
|
echo "<BLOCKQUOTE>";
|
2002-12-29 14:39:52 +00:00
|
|
|
|
|
|
|
document_file($file, true);
|
|
|
|
|
2002-10-29 14:48:58 +00:00
|
|
|
echo "</BLOCKQUOTE>";
|
2002-08-18 16:31:23 +00:00
|
|
|
|
|
|
|
?>
|
|
|
|
|