| Current Path : /var/www/cesa.co.za/php/templates/cesanet/ |
| Current File : /var/www/cesa.co.za/php/templates/cesanet/student_assignment_extensions.php |
<?php
if (isset($extensionRequests) && is_array($extensionRequests) && count($extensionRequests) > 0) {
$lastExtDate = new DateTime($extensionRequests[0]['CCEExtensionDate']);
?>
<div class="text-center">
Extension requested to <?php echo $lastExtDate->format('j F Y') ?>.
<a href="#" id="moreExtensions_<?php echo $studentID ?>_<?php echo $assignmentID ?>">More...</a>
</div>
<div id="moreExtensions_dialog_<?php echo $studentID ?>_<?php echo $assignmentID ?>" title="My Assignment Extensions">
<table class="table" border="1" cellspacing="0" cellpadding="4" width="90%" align="center">
<thead>
<tr>
<th>Requested Date</th>
<th>Due Date</th>
<th>Motivation</th>
<th>Motivation File</th>
<th>Status</th>
<th>Approved Due Date</th>
<th>Convenor Feedback</th>
</tr>
</thead>
<tbody>
<?php
foreach ($extensionRequests as $extensionRequest) {
$reqDate = new DateTime($extensionRequest['DateRequested']);
$extDate = new DateTime($extensionRequest['CCEExtensionDate']);
?>
<tr>
<td align="center" nowrap><?php echo $reqDate->format('j F Y'); ?></td>
<td align="center" nowrap><?php echo $extDate->format('j F Y'); ?></td>
<td align="left"><?php echo $extensionRequest['Motivation']; ?></td>
<td align="center">
<?php
if (strlen($extensionRequest['SupportingDoc']) > 0) {
?>
<a href="/cceadmin/assignmentsupload/<?php echo $extensionRequest['SupportingDoc']; ?>" target="_blank"><?php echo $extensionRequest['SupportingDoc']; ?></a>
<?php
} else {
echo '-';
}
?>
</td>
<td align="center" nowrap><?php echo CCEStAssigExtensionRequest::getStatusString($extensionRequest['Status']); ?></td>
<td align="center" nowrap>
<?php
if (is_null($extensionRequest['ApprovedCCEExtensionDate']) && $extensionRequest['Status'] == 'A') {
$extensionRequest['ApprovedCCEExtensionDate'] = $extensionRequest['CCEExtensionDate'];
}
if (!is_null($extensionRequest['ApprovedCCEExtensionDate'])) {
$extDateApproved = new DateTime($extensionRequest['ApprovedCCEExtensionDate']);
echo $extDateApproved->format('j F Y');
} else {
echo '-';
}
?>
</td>
<td align="left">
<?php
if (strlen($extensionRequest['StatusReason']) > 0) {
echo nl2br($extensionRequest['StatusReason']);
} else {
echo '-';
}
?>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
<?php
}
?>
<script>
$(document).ready(function () {
$("#moreExtensions_dialog_<?php echo $studentID ?>_<?php echo $assignmentID ?>").dialog({
autoOpen: false,
modal: true,
width: '60%',
buttons: {
Ok: function () {
$(this).dialog("close");
}
}
});
$('#moreExtensions_<?php echo $studentID ?>_<?php echo $assignmentID ?>').click(function () {
$("#moreExtensions_dialog_<?php echo $studentID ?>_<?php echo $assignmentID ?>").dialog('open');
return false;
});
});
</script>