2001-11-22 06:23:56 +00:00
|
|
|
<?PHP // $Id$
|
2002-08-11 15:41:54 +00:00
|
|
|
// Displays live view of recent logs
|
2001-11-22 06:23:56 +00:00
|
|
|
|
2003-01-05 14:19:20 +00:00
|
|
|
require_once("../config.php");
|
|
|
|
require_once("lib.php");
|
2001-11-22 06:23:56 +00:00
|
|
|
|
2003-05-24 07:29:17 +00:00
|
|
|
require_variable($id);
|
|
|
|
|
|
|
|
require_login();
|
2001-11-22 06:23:56 +00:00
|
|
|
|
|
|
|
if (! $course = get_record("course", "id", $id) ) {
|
|
|
|
error("That's an invalid course id");
|
|
|
|
}
|
|
|
|
|
2002-04-03 06:36:04 +00:00
|
|
|
if (! isteacher($course->id)) {
|
2001-11-22 06:23:56 +00:00
|
|
|
error("Only teachers can view logs");
|
|
|
|
}
|
|
|
|
|
2002-08-11 15:41:54 +00:00
|
|
|
$strlivelogs = get_string("livelogs");
|
2003-04-26 12:17:30 +00:00
|
|
|
$strupdatesevery = get_string("updatesevery", "moodle", COURSE_LIVELOG_REFRESH);
|
2002-08-11 15:41:54 +00:00
|
|
|
|
|
|
|
print_header("$strlivelogs ($strupdatesevery)", "$strlivelogs", "", "",
|
2003-04-26 12:17:30 +00:00
|
|
|
"<META HTTP-EQUIV='Refresh' CONTENT='".COURSE_LIVELOG_REFRESH."; URL=loglive.php?id=$id'>");
|
2001-11-22 06:23:56 +00:00
|
|
|
|
|
|
|
$user=0;
|
|
|
|
$date=time() - 3600;
|
|
|
|
|
2003-08-22 08:42:17 +00:00
|
|
|
print_log($course, $user, $date, "l.time DESC", 0, 500,
|
|
|
|
"loglive.php?id=$course->id&user=$user&date=$date");
|
2001-11-22 06:23:56 +00:00
|
|
|
|
|
|
|
exit;
|
|
|
|
|
|
|
|
?>
|