2 require 'include/head.inc';
3 require 'include/db.inc';
4 require 'include/session.inc';
5 require 'include/common.inc';
7 if(isset($_POST['submit']) && $_POST['mnumber']!="") {
8 $mnumber = trim($_POST['mnumber']);
9 $password = trim($_POST['password']);
11 require 'include/usercheck.inc';
13 block("black", "summary for " . $_POST['mnumber']);
15 print "<b>Examples Submitted</b>";
20 foreach ($SESSIONS as $session) {
21 if ($session['id'] == $SESSIONS_next) { break; }
23 $exdone = $db->query("SELECT thisdone, manydone FROM workdone WHERE mnumber=" . $mnumber . " AND session=" . $session['id'])->fetch(PDO::FETCH_NUM);
25 if ( $exdone[1] == "" ) { $exdone[1] = "0"; }
27 $tot_done = $tot_done + $exdone[1];
30 print "<td>" . $session['timestr'] . " </td>";
31 print "<td>" . $session['examples'] . "(" . $session['nexamples'] . ")" . " </td>";
32 print "<td>" . $exdone[1] . "/" . $session['nexamples'] . "(" . $exdone[0] . ")" . " </td>";
36 print "<td></td><td></td><td><b>" . $tot_done . "/" . $SESSIONS_totex . "</b></td>";
43 print "<b>Blackboard</b>";
44 $blackdone = $db->query("SELECT blackboard FROM students WHERE mnumber=" . $mnumber)->fetch(PDO::FETCH_NUM)[0];
48 for( $ib=0; $ib<$blackdone; $ib++ ) { echo " * "; }
54 <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
55 <table bgcolor="black">
56 <tr><th><b><font color="white">Summary</font></b></th><tr>
61 <th align="left">Mat.nummer:</th> <th align="left"><input type="text" name="mnumber"></th>
64 <th align="left">Password:</th> <th align="left"><input type="text" name="password"></th>
66 <tr><th colspan=2></th></tr>
69 <th align="left"><input type="submit" name="submit" value="Show"></th> <th></th>