end_time) {
$d = $view->end_time - $view->start_time;
$dur = "$d seconds";
} else {
$dur = "---";
}
if ($view->result_id) {
$result = BoltResult::lookup_id($view->result_id);
$qs = str_replace("action=answer", "action=answer_page", $result->response);
$x = "
Score: $result->score
Answer page";
}
echo "
".time_str($view->start_time)." |
$dur |
$view->item_name |
".mode_name($view->mode)." $x |
".action_name($view->action)." |
";
}
require_once("../inc/bolt_db.inc");
$course_id = get_int('course_id');
$course = BoltCourse::lookup_id($course_id);
page_head("Your history in $course->name");
$views = BoltView::enum("user_id=$user->id and course_id=$course_id order by id desc");
start_table();
table_header("Time", "Duration", "Item", "Type", "Action");
foreach ($views as $view) {
show_view($view);
}
end_table();
echo "
Resume course
";
page_tail();
?>