| Current Path : /var/www/cesa.co.za/php/templates/cesanet/ |
| Current File : /var/www/cesa.co.za/php/templates/cesanet/student_progress_report.php |
<p><b><a name="Student<?php echo $row["CCEStudentID"]; ?>"></a><?php echo $row["KnownAs"] . " " . $row["Surname"]; ?></b></p>
<p>
Student Average: <?php echo GetAverageAssigScore($row["CCEStudentID"]); ?><br />
Class Average: <?php echo $iClassAvg; ?><br />
Modules Average:
<ul>
<li>CEE: <?php echo GetAverageAssigScore($row["CCEStudentID"], false, 1); ?></li>
<li>Project Delivery: <?php echo GetAverageAssigScore($row["CCEStudentID"], false, 2); ?></li>
<li>Finance: <?php echo GetAverageAssigScore($row["CCEStudentID"], false, 3); ?></li>
<li>Law: <?php echo GetAverageAssigScore($row["CCEStudentID"], false, 4); ?></li>
<li>Interpersonal Skills: <?php echo GetAverageAssigScore($row["CCEStudentID"], false, 5); ?></li>
</ul>
</p>
<script type="text/javascript">
function drawChart<?php echo $row["CCEStudentID"]; ?>() {
var data<?php echo $row["CCEStudentID"]; ?> = google.visualization.arrayToDataTable([
['Ref', 'Score', 'Target Score'] <?php
mysqli_data_seek($recAssignments, 0);
while ($rowA = mysqli_fetch_assoc($recAssignments)) {
echo "," . "\r\n" . "['" . substr($rowA["RefNum"], 0, 6) . "', ";
$sql = "SELECT AssignmentScore FROM CCEStudentAssignments WHERE CCEStudentID=" . $row["CCEStudentID"] . " AND CCEAssignmentID=" . $rowA["CCEAssignmentID"] . " "
. "ORDER BY CCEStudentAssigID DESC LIMIT 0,1";
$recS = mysqli_query($conni, $sql);
if ($rowS = mysqli_fetch_assoc($recS)) {
echo ($rowS["AssignmentScore"] + 0);
} else {
echo "null";
}
// echo ",".round($rowA["AvgScore"],1);
echo ", 6]";
}
?>
]);
var options<?php echo $row["CCEStudentID"]; ?> = {
title: "Assignment Score",
legend: 'bottom',
width: 1000,
height: 400,
vAxis: {
minValue: 0,
maxValue: 10
},
hAxis: {
slantedText: true,
slantedTextAngle: 90,
showTextEvery: 1,
textStyle: {
fontSize: 11
}
},
seriesType: 'bars',
series: {
1: {
type: 'line'
}
}
};
var chart_div<?php echo $row["CCEStudentID"]; ?> = document.getElementById('chart_div<?php echo $row["CCEStudentID"]; ?>');
var chart<?php echo $row["CCEStudentID"]; ?> = new google.visualization.ComboChart(chart_div<?php echo $row["CCEStudentID"]; ?>);
// Wait for the chart to finish drawing before calling the getImageURI() method.
google.visualization.events.addListener(chart<?php echo $row["CCEStudentID"]; ?>, 'ready', function() {
chart_div<?php echo $row["CCEStudentID"]; ?>.innerHTML = '<img src="' + chart<?php echo $row["CCEStudentID"]; ?>.getImageURI() + '">';
});
chart<?php echo $row["CCEStudentID"]; ?>.draw(data<?php echo $row["CCEStudentID"]; ?>, options<?php echo $row["CCEStudentID"]; ?>);
}
</script>
<table border=1 cellspacing=0 cellpadding=2 width="100%">
<tr>
<th><b>Ref</b></th>
<th><b>Score</b></th>
<th><b>Due Date</b></th>
<th><b>Date Submitted</b></th>
</tr>
<?php
mysqli_data_seek($recAssignments, 0);
while ($rowA = mysqli_fetch_assoc($recAssignments)) {
?>
<tr>
<td><?php echo $rowA["RefNum"]; ?></td>
<td align="center">
<?php
$sDateSubmitted = "";
$sDueDate = $rowA["DueDate"];
$sql = "SELECT CCEStudentAssignments.*, CCEMessages.SentDateTime
FROM CCEStudentAssignments
LEFT JOIN (CCEAssignmentFeedback JOIN CCEMessages USING (CCEMessageID)) USING (CCEStudentAssigID)
WHERE CCEStudentAssignments.CCEStudentID=" . $row["CCEStudentID"] . " AND CCEStudentAssignments.CCEAssignmentID=" . $rowA["CCEAssignmentID"] . "
ORDER BY CCEStudentAssigID DESC";
// echo $sql;
$recSA = mysqli_query($conni, $sql);
if ($rowSA = mysqli_fetch_assoc($recSA)) {
if ($rowSA["RulingCode"] == "NE") {
echo "Needs Enhancement";
} elseif ($rowSA["RulingCode"] == "R") {
echo "Must Resubmit";
} elseif (empty($rowSA["RulingCode"])) {
echo "Not Yet Marked";
} else {
echo $rowSA["AssignmentScore"];
}
$sDateSubmitted = date("Y-m-d", strtotime($rowSA["DateSubmitted"]));
} else {
echo "Not Submitted";
}
if ($rowSA = mysqli_fetch_assoc($recSA)) {
if (strlen($rowSA["SentDateTime"]) > 0) {
//$sDueDate=($rowSA["RulingCode"]=="R"?"Resubmission due ":($rowSA["RulingCode"]=="NE"?"Enhancement due ":"Due "))." on ".date("Y-m-d", strtotime("+2 weeks",strtotime($rowSA["SentDateTime"])));
$sDueDate = date("Y-m-d", strtotime("+2 weeks", strtotime($rowSA["SentDateTime"])));
// echo '<br />Sent: ' . $rowSA["SentDateTime"] . '<br />';
$sDueDate .= ($rowSA["RulingCode"] == "R" ? " (resubmission)" : ($rowSA["RulingCode"] == "NE" ? " (enhancement)" : ""));
}
}
?>
</td>
<td align="center"><?php echo $sDueDate; ?>
<?php
$sql = "SELECT MAX(CCEExtensionDate) AS ExtDate FROM CCEStAssigExtensions WHERE CCEStudentID=" . $row["CCEStudentID"] . " AND CCEAssignmentID=" . $rowA["CCEAssignmentID"];
$recSA = mysqli_query($conni, $sql);
if ($rowSA = mysqli_fetch_assoc($recSA)) {
if (!empty($rowSA["ExtDate"]))
echo "<br>Extension granted until " . $rowSA["ExtDate"];
}
?></td>
<td align="center"><?php
if (!empty($sDateSubmitted))
echo $sDateSubmitted;
?></td>
</tr>
<?php
}
?>
<tr>
<td colspan="4">
<div id='chart_div<?php echo $row["CCEStudentID"]; ?>'></div>
</td>
</tr>
</table>
<hr>