Polished.
[moodle.git] / course / loglive.php
bloba643335a5aabc794ac22087a62c53b9c27b52722
1 <?PHP // $Id$
2 // Displays live view of recent logs
4 require_once("../config.php");
5 require_once("lib.php");
7 require_variable($id);
9 require_login();
11 if (! $course = get_record("course", "id", $id) ) {
12 error("That's an invalid course id");
15 if (! isteacher($course->id)) {
16 error("Only teachers can view logs");
19 $strlivelogs = get_string("livelogs");
20 $strupdatesevery = get_string("updatesevery", "moodle", COURSE_LIVELOG_REFRESH);
22 print_header("$strlivelogs ($strupdatesevery)", "$strlivelogs", "", "",
23 "<META HTTP-EQUIV='Refresh' CONTENT='".COURSE_LIVELOG_REFRESH."; URL=loglive.php?id=$id'>");
25 $user=0;
26 $date=time() - 3600;
28 print_log($course, $user, $date, "ORDER BY l.time DESC");
30 exit;