libdir.'/adminlib.php'); $id = required_param('id', PARAM_INT);// Course ID if (!$course = get_record('course', 'id', $id) ) { error('That\'s an invalid course id'.$id); } require_login($course); $context = get_context_instance(CONTEXT_COURSE, $course->id); require_capability('coursereport/log:viewlive', $context); $strlogs = get_string('logs'); $strreports = get_string('reports'); if ($course->id == SITEID) { admin_externalpage_setup('reportloglive','',array('id' => $course->id)); admin_externalpage_print_header(); } else { $navlinks = array(); $navlinks[] = array('name' => $strreports, 'link' => "$CFG->wwwroot/course/report.php?id=$course->id", 'type' => 'misc'); $navlinks[] = array('name' => $strlogs, 'link' => null, 'type' => 'misc'); $navigation = build_navigation($navlinks); print_header($course->shortname .': '. $strlogs, $course->fullname, $navigation, ''); } print_heading(get_string('loglive', 'coursereport_log')); echo '