2 require 'include/head.inc';
3 require 'include/db.inc';
4 require 'include/session.inc';
5 require 'include/common.inc';
7 if (! isset($SESSIONS_actual)) {
8 block("red", "no next session");
12 block("black", "summary for session " . $SESSIONS[$SESSIONS_actual]['timestr'] . " (" . $SESSIONS[$SESSIONS_actual]['examples'] . ")");
14 $result = $db->query("SELECT firstname, lastname, mnumber, blackboard FROM students ORDER BY lastname");
17 print "<td><b>First name </b></td><td><b>Last name </b></td><td><b>Matr.nummer </b></td><td><b>Examples </b></td><td><b>Blackboard </b></td>";
18 while ($student = $result->fetch(PDO::FETCH_ASSOC)) {
19 $result2 = $db->query("SELECT manydone, thisdone FROM workdone WHERE mnumber=" . $student['mnumber'] . " AND session=" . $SESSIONS_actual)->fetch(PDO::FETCH_NUM);
21 $exdone = $result2[0];
22 if ($exdone == "") { $exdone=0; }
24 $thisdone = $result2[1];
27 print "<td>" . $student['firstname'] . "</td>";
28 print "<td>" . $student['lastname'] . "</td>";
29 print "<td>" . $student['mnumber'] . "</td>";
30 print "<td>" . $thisdone . " (" . $exdone . "/" . $SESSIONS[$SESSIONS_actual]['nexamples'] . ")</td>";
31 print "<td>" . $student['blackboard'] . "</td>";