require 'include/db.inc';
require 'include/session.inc';
require 'include/common.inc';
+ require 'include/exams.inc';
if(isset($_POST['submit']) && $_POST['mnumber']!="") {
$mnumber = trim($_POST['mnumber']);
}
}
print "<tr>";
- print "<td></td><td></td><td><b>" . $tot_done . "/" . $SESSIONS_totex . "</b></td>";
+ print "<td></td><td></td><td><b>" . $tot_done . "/" . $SESSIONS_totex . " ==> " . round(100 * $tot_done / $SESSIONS_totex) . "%</b></td>";
print "</tr>";
print "</table>";
print "<br>";
+ print "<b>Exams</b><br>";
+
+ print "<table>";
+
+ $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 "<tr>";
+ print "<td>" . $exam['timestr'] . " </td>";
+ print "<td>{" . $scorestr . "}=" . $singlescore . "/" . $exam['totscore'] . " </td>";
+ print "<td>" . round(100*$singlescore/$exam['totscore']) . "% </td>";
+ print "</tr>";
+ }
+ $examscore = ($examscore / $EXAMS_n)*100;
+
+ if ($EXAMS_n > 0 ) {
+ print "<tr>";
+ print "<td></td><td></td>";
+ print "<td><b>" . round($examscore) . "%</b></td>";
+ print "</tr>";
+ }
+
+ print "</table>";
+
+ print "<br>";
+
print "<b>Blackboard</b>";
$blackdone = $db->query("SELECT blackboard FROM students WHERE mnumber=" . $mnumber)->fetch(PDO::FETCH_NUM)[0];