mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
30 lines
713 B
PHP
30 lines
713 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;
|
|
|
|
?>
|