Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

29 lines (20 sloc) 0.744 kb
<?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>";
}
?>
Jump to Line
Something went wrong with that request. Please try again.