hook for redirecting to externally hosted courses

This commit is contained in:
fiedorow 2005-02-16 13:41:37 +00:00
parent b7dd445484
commit 542a04353b

View File

@ -32,6 +32,17 @@
require_login($course->id);
//If course is hosted on an external server, redirect to corresponding
//url with appropriate authentication attached as parameter
if (file_exists($CFG->dirroot ."/course/externservercourse.php")) {
include $CFG->dirroot ."/course/externservercourse.php";
if (function_exists(extern_server_course)) {
if ($extern_url = extern_server_course($course)) {
redirect($extern_url);
}
}
}
require_once($CFG->dirroot.'/calendar/lib.php'); /// This is after login because it needs $USER
add_to_log($course->id, "course", "view", "view.php?id=$course->id", "$course->id");