$tot_done = 0;
- foreach ($SESSIONS as $session) {
- if ($session['id'] == $SESSIONS_next) { break; }
+ if( isset($SESSIONS) ) {
+ foreach ($SESSIONS as $session) {
+ if ( isset($SESSIONS_next) ) {
+ if ($session['id'] == $SESSIONS_next) { break; }
+ }
- $exdone = $db->query("SELECT thisdone, manydone FROM workdone WHERE mnumber=" . $mnumber . " AND session=" . $session['id'])->fetch(PDO::FETCH_NUM);
+ $exdone = $db->query("SELECT thisdone, manydone FROM workdone WHERE mnumber=" . $mnumber . " AND session=" . $session['id'])->fetch(PDO::FETCH_NUM);
- if ( $exdone[1] == "" ) { $exdone[1] = "0"; }
+ if ( $exdone[1] == "" ) { $exdone[1] = "0"; }
- $tot_done = $tot_done + $exdone[1];
+ $tot_done = $tot_done + $exdone[1];
- print "<tr>";
- print "<td>" . $session['timestr'] . " </td>";
- print "<td>" . $session['examples'] . "(" . $session['nexamples'] . ")" . " </td>";
- print "<td>" . $exdone[1] . "/" . $session['nexamples'] . "(" . $exdone[0] . ")" . " </td>";
- print "</tr>";
+ print "<tr>";
+ print "<td>" . $session['timestr'] . " </td>";
+ print "<td>" . $session['examples'] . "(" . $session['nexamples'] . ")" . " </td>";
+ print "<td>" . $exdone[1] . "/" . $session['nexamples'] . "(" . $exdone[0] . ")" . " </td>";
+ print "</tr>";
+ }
}
print "<tr>";
print "<td></td><td></td><td><b>" . $tot_done . "/" . $SESSIONS_totex . "</b></td>";
for( $ib=0; $ib<$blackdone; $ib++ ) { echo " * "; }
- break;
+ exit;
}
?>
<form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<table bgcolor="black">
- <tr><th><b><font color="white">Last submission</font></b></th><tr>
+ <tr><th><b><font color="white">Summary</font></b></th><tr>
</table>
<table>