X-Git-Url: https://git.treefish.org/banana.git/blobdiff_plain/da4d58fd2fe170781a7810fb5265b4744ce636ed..24a718f3612d0b9dc396970cfa85298d33655570:/summary.php

diff --git a/summary.php b/summary.php
index bd7ac7f..d63c765 100644
--- a/summary.php
+++ b/summary.php
@@ -12,7 +12,25 @@
 
     block("black", "summary for " . $_POST['mnumber']);
 
-    print "<b>Examples Submitted</b>";
+    if ( isset($SESSIONS_next) ) {
+       print "<b>Submitted for next session on " . $SESSIONS[$SESSIONS_next]['timestr']  . "</b>";
+
+       print "<table>";
+
+       if($db->query("SELECT COUNT(*) FROM workdone WHERE mnumber = $mnumber AND session = $SESSIONS_next")->fetch(PDO::FETCH_NUM)[0] == 0) {
+         print "<tr><td>0 (0/" . $SESSIONS[$SESSIONS_next]['nexamples'] . ")</td></tr>";
+       }
+       else {
+         $wdone = $db->query("SELECT thisdone,manydone FROM workdone WHERE mnumber = $mnumber AND session = $SESSIONS_next")->fetch(PDO::FETCH_NUM);
+	 print "<tr><td>" . $wdone[0] . "&nbsp;(" . $wdone[1] . "/" . $SESSIONS[$SESSIONS_next]['nexamples'] . ")</td></tr><br>";
+       }
+
+       print "</table>";
+
+       print "<br>";
+    }
+
+    print "<b>Examples submitted so far</b>";
     print "<table>";
 
     $tot_done = 0;