From 24a718f3612d0b9dc396970cfa85298d33655570 Mon Sep 17 00:00:00 2001 From: Alexander Schmidt Date: Mon, 8 Oct 2012 11:25:58 +0200 Subject: [PATCH 1/1] added next session to summary. --- summary.php | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) 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 "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 ""; + } + else { + $wdone = $db->query("SELECT thisdone,manydone FROM workdone WHERE mnumber = $mnumber AND session = $SESSIONS_next")->fetch(PDO::FETCH_NUM); + print "
"; + } + + print "
0 (0/" . $SESSIONS[$SESSIONS_next]['nexamples'] . ")
" . $wdone[0] . " (" . $wdone[1] . "/" . $SESSIONS[$SESSIONS_next]['nexamples'] . ")
"; + + print "
"; + } + + print "Examples submitted so far"; print ""; $tot_done = 0; -- 2.39.5