moodle/course/loglive.php

31 lines
780 B
PHP
Raw Normal View History

2001-11-22 06:23:56 +00:00
<?PHP // $Id$
// Displays live view of recent logs
2001-11-22 06:23:56 +00:00
require_once("../config.php");
require_once("lib.php");
2001-11-22 06:23:56 +00:00
require_login($id);
if (! $course = get_record("course", "id", $id) ) {
error("That's an invalid course id");
}
if (! isteacher($course->id)) {
2001-11-22 06:23:56 +00:00
error("Only teachers can view logs");
}
$strlivelogs = get_string("livelogs");
$strupdatesevery = get_string("updatesevery", "moodle", COURSE_LIVELOG_REFRESH);
print_header("$strlivelogs ($strupdatesevery)", "$strlivelogs", "", "",
"<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;
print_log($course, $user, $date, "ORDER BY l.time DESC");
exit;
?>