Make the Help link in the course look like a seamless part of the course.

This commit is contained in:
martin
2002-08-18 16:31:23 +00:00
parent 44dad7350b
commit 3c7331da30
3 changed files with 32 additions and 1 deletions
+30
View File
@@ -0,0 +1,30 @@
<?PHP // $Id$
require("../config.php");
require_variable($id); // course context
require_variable($file); // file in this directory to view
if (! $course = get_record("course", "id", $id)) {
error("Course is misconfigured");
}
if (!isteacher($course->id)) {
error("Only teachers can look at this page");
}
$file = clean_filename($file);
if (file_exists($file)) {
$strhelp = get_string("help");
print_header("$course->shortname: $strhelp", "$course->fullname",
"<A HREF=\"../course/view.php?id=$course->id\">$course->shortname</A> -> $strhelp");
echo "<BLOCKQUOTE>";
include($file);
echo "</BLOCKQUOTE>";
}
print_footer($course);
?>