$SESSIONS_totex = 0;
if(isset($SESSIONS)) {
foreach ($SESSIONS as $session) {
- if($session['id'] < $SESSIONS_next) { $SESSIONS_totex += $session['nexamples']; }
+ if($session['id'] < $SESSIONS_next || (! isset($SESSIONS_next)) ) { $SESSIONS_totex += $session['nexamples']; }
+ if( $session['id'] != $SESSIONS_actual ) { $SESSIONS_last = $session['id']; }
}
}