From fcea930220d4896e30baa93ee1603b08df1ff4d7 Mon Sep 17 00:00:00 2001 From: Alexander Schmidt Date: Mon, 8 Oct 2012 17:21:42 +0200 Subject: [PATCH 1/1] ... --- admin/sessionoverview.php | 93 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 admin/sessionoverview.php diff --git a/admin/sessionoverview.php b/admin/sessionoverview.php new file mode 100644 index 0000000..570f59b --- /dev/null +++ b/admin/sessionoverview.php @@ -0,0 +1,93 @@ +query("SELECT COUNT(*) FROM workdone WHERE mnumber=$up_mnumber AND session=$up_sessionid AND tstamp=$up_tstamp")->fetch(PDO::FETCH_NUM)[0] == 0 ) { + $db->query("UPDATE workdone SET thisdone='$up_editsub', manydone=" . count(explode(",",$up_editsub)) . ",tstamp=$up_tstamp WHERE mnumber=$up_mnumber AND session=$up_sessionid"); + block("lightgreen", "modified submit"); + } + } + + print "
"; + print ""; + print "
"; + + block("black", "summary for session " . $SESSIONS[$showsession]['timestr'] . " (" . $SESSIONS[$showsession]['examples'] . ")"); + + $result = $db->query("SELECT firstname, lastname, mnumber, blackboard FROM students ORDER BY LOWER(lastname)"); + + print ""; + print ""; + + if( $showsession == $SESSIONS_actual ) { + print ""; + } + else { + print ""; + } + + while ($student = $result->fetch(PDO::FETCH_ASSOC)) { + $result2 = $db->query("SELECT manydone, thisdone FROM workdone WHERE mnumber=" . $student['mnumber'] . " AND session=" . $showsession)->fetch(PDO::FETCH_NUM); + + $exdone = $result2[0]; + if ($exdone == "") { $exdone=0; } + + $thisdone = $result2[1]; + + print ""; + print ""; + print ""; + print ""; + print ""; + + if( $showsession != $SESSIONS_actual ) { + print ""; + } + else { + print ""; + } + + print ""; + } + print "
First name Last name Matr.nummer Examples Blackboard Modify 
" . $student['firstname'] . "" . $student['lastname'] . "" . $student['mnumber'] . "" . $thisdone . " (" . $exdone . "/" . $SESSIONS[$showsession]['nexamples'] . ")
"; + if( isset($_GET['sessionselected']) ) { print ""; } + print ""; + print ""; + print ""; + print ""; + print "
" . $student['blackboard'] . "
"; +?> -- 2.39.5