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 ( 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);
if ( $exdone[1] == "" ) { $exdone[1] = "0"; }
$tot_done = $tot_done + $exdone[1];
print "";
print "" . $session['timestr'] . " | ";
print "" . $session['examples'] . "(" . $session['nexamples'] . ")" . " | ";
print "" . $exdone[1] . "/" . $session['nexamples'] . "(" . $exdone[0] . ")" . " | ";
print "
";
}
}
print "";
print " | | " . $tot_done . "/" . $SESSIONS_totex . " ==> " . round(100 * $tot_done / $SESSIONS_totex) . "% | ";
print "
";
print "
";
print "
";
print "Exams
";
print "";
$examscore=0;
foreach ($EXAMS as $exam) {
$scorestr = $db->query("SELECT scorestr FROM examscore WHERE mnumber=" . $mnumber . " AND exam=" . $exam['id'])->fetch(PDO::FETCH_NUM)[0];
$singlescore = 0;
if ($scorestr != "") {
foreach (explode(',',$scorestr) as $points) { $singlescore = $singlescore + $points; }
$examscore = $examscore + $singlescore/$exam['totscore'];
}
print "";
print "" . $exam['timestr'] . " | ";
print "{" . $scorestr . "}=" . $singlescore . "/" . $exam['totscore'] . " | ";
print "" . round(100*$singlescore/$exam['totscore']) . "% | ";
print "
";
}
$examscore = ($examscore / $EXAMS_n)*100;
if ($EXAMS_n > 0 ) {
print "";
print " | | ";
print "" . round($examscore) . "% | ";
print "
";
}
print "
";
print "
";
print "Blackboard";
$blackdone = $db->query("SELECT blackboard FROM students WHERE mnumber=" . $mnumber)->fetch(PDO::FETCH_NUM)[0];
print "
";
for( $ib=0; $ib<$blackdone; $ib++ ) { echo " * "; }
exit;
}
?>