X-Git-Url: http://git.treefish.org/banana.git/blobdiff_plain/f0f8ed081a8af374676dea9f97b60e336f8b4ae7..7b7f10ba3917a6d5229f13d27aa4e94a9685b00e:/summary.php?ds=sidebyside
diff --git a/summary.php b/summary.php
index cfc0565..d63c765 100644
--- a/summary.php
+++ b/summary.php
@@ -12,14 +12,34 @@
block("black", "summary for " . $_POST['mnumber']);
- print "Examples Submitted";
+ if ( isset($SESSIONS_next) ) {
+ print "Submitted for next session on " . $SESSIONS[$SESSIONS_next]['timestr'] . "";
+
+ print "
";
+
+ if($db->query("SELECT COUNT(*) FROM workdone WHERE mnumber = $mnumber AND session = $SESSIONS_next")->fetch(PDO::FETCH_NUM)[0] == 0) {
+ print "0 (0/" . $SESSIONS[$SESSIONS_next]['nexamples'] . ") |
";
+ }
+ else {
+ $wdone = $db->query("SELECT thisdone,manydone FROM workdone WHERE mnumber = $mnumber AND session = $SESSIONS_next")->fetch(PDO::FETCH_NUM);
+ print "" . $wdone[0] . " (" . $wdone[1] . "/" . $SESSIONS[$SESSIONS_next]['nexamples'] . ") |
";
+ }
+
+ print "
";
+
+ print "
";
+ }
+
+ print "Examples submitted so far";
print "";
$tot_done = 0;
if( isset($SESSIONS) ) {
foreach ($SESSIONS as $session) {
- if ($session['id'] == $SESSIONS_next) { break; }
+ 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);