Several people have reported difficulties in viewing past sessions. We had the same problem in version 1.4.2. It appears that file 'report.php' has a small error that hides the first session in the chat. I made the following addition (in bold) to lines 137-141:
if (empty($messages)) { /// May have already got them above
if (!$messages = get_records_select("chat_messages", "chatid = '$chat->id' $groupselect", "timestamp DESC")) {
print_heading(get_string("nomessages", "chat"));
print_footer($course);
exit;
}
unset($dummymessage);
$dummymessage->system = 1;
$dummymessage->timestamp = 0;
$dummymessage->userid = 1;
$messages[] = $dummymessage;
}
And yes, I admit it is a 'lazy' solution, but it seems to work anyway...