moodle/course/loglive.php

36 lines
909 B
PHP
Raw Normal View History

2004-09-12 12:21:27 +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_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");
}
if (! isteacher($course->id)) {
2001-11-22 06:23:56 +00:00
error("Only teachers can view logs");
}
session_write_close();
$strlivelogs = get_string("livelogs");
$strupdatesevery = get_string("updatesevery", "moodle", COURSE_LIVELOG_REFRESH);
print_header("$strlivelogs ($strupdatesevery)", "$strlivelogs", "", "",
2004-09-12 21:43:59 +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;
print_log($course, $user, $date, "l.time DESC", 0, 500,
"loglive.php?id=$course->id&amp;user=$user&amp;date=$date");
2001-11-22 06:23:56 +00:00
exit;
?>