mirrored from git://git.moodle.org/moodle.git
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make the Help link in the course look like a seamless part of the cou…
…rse.
- Loading branch information
martin
committed
Aug 18, 2002
1 parent
44dad73
commit 3c7331d
Showing
3 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
|
||
?> | ||
|