I have idea: if interval between two log records more then one hour, we can write session separator! It can be with some information about displayed working session and about founded interval.
And this idea in result here as simple patch (in base of v1.5.3+), which i would like to be injected into main moodle branch. General developers, please, look at this and add into CSV!
to file /course/lib.php add two piece of code
1) Inside loop by log records add
$log->url = str_replace('&', '&', $log->url); /// XHTML compatibility2) just after cicle:
// <<-- start of addition 1
if (isset($PrevTime) and (($PrevTime - $log->time) > 1*60*60)) {
echo '<tr class="r'.$row.'"><td colspan=6>';
echo get_string('log_work_time').': ';
$diff = (floor($BeginTime / 60) - floor($PrevTime / 60)) * 60;
echo $diff==0?'0':format_time($diff);
unset($BeginTime);
echo '<hr>'.get_string('log_interval').': ';
echo format_time((floor($PrevTime / 60) - floor($log->time / 60)) * 60);
echo '<br><hr></td></tr>';
}
$PrevTime = $log->time;
if (!isset($BeginTime)) {
$BeginTime = $log->time;
}
// -->> finish of addition 1
}And (optional
// <<-- start of addition 2
if (isset($PrevTime) and isset($BeginTime)) {
echo '<tr class="r'.$row.'"><td colspan=6>';
echo get_string('log_work_time').': ';
$diff = (floor($BeginTime / 60) - floor($PrevTime / 60)) * 60;
echo $diff==0?'0':format_time($diff);
echo '</td></tr>';
}
// -->> finish of addition 2
echo '</table>';
