moodle/course/loglive.php
2001-11-22 06:23:56 +00:00

30 lines
714 B
PHP

<?PHP // $Id$
// loglive.php - displays different views of the logs.
require("../config.php");
require("lib.php");
require_login($id);
if (! $course = get_record("course", "id", $id) ) {
error("That's an invalid course id");
}
if ( ! isteacher($course->id)) {
error("Only teachers can view logs");
}
print_header("Activity within the last hour (updates every 60 secs)",
"Activity within the last hour (updates every 60 secs)",
"", "", "<META HTTP-EQUIV='Refresh' CONTENT='60; URL=loglive.php?id=$id'>");
$user=0;
$date=time() - 3600;
print_log($course, $user, $date, "ORDER BY l.time DESC");
exit;
?>