Your IP : 216.73.217.79


Current Path : /var/www/cesa.co.za/cceconvenors/
Upload File :
Current File : /var/www/cesa.co.za/cceconvenors/CCEStudentAssignmentsview.php

<?php
session_start(); // Initialize Session data
ob_start(); // Turn on output buffering
?>
<?php include "ewcfg7.php" ?>
<?php include "ewmysql7.php" ?>
<?php include "phpfn7.php" ?>
<?php include "CCEStudentAssignmentsinfo.php" ?>
<?php include "CCEAssignmentsinfo.php" ?>
<?php include "CCEFacilitatorUsersinfo.php" ?>
<?php include "CCEStudentsinfo.php" ?>
<?php include "userfn7.php" ?>
<?php
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // Always modified
header("Cache-Control: private, no-store, no-cache, must-revalidate"); // HTTP/1.1 
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache"); // HTTP/1.0
?>
<?php

// Create page object
$CCEStudentAssignments_view = new cCCEStudentAssignments_view();
$Page =& $CCEStudentAssignments_view;

// Page init
$CCEStudentAssignments_view->Page_Init();

// Page main
$CCEStudentAssignments_view->Page_Main();
?>
<?php include "header.php" ?>
<?php if ($CCEStudentAssignments->Export == "") { ?>
<script type="text/javascript">
<!--

// Create page object
var CCEStudentAssignments_view = new ew_Page("CCEStudentAssignments_view");

// page properties
CCEStudentAssignments_view.PageID = "view"; // page ID
CCEStudentAssignments_view.FormID = "fCCEStudentAssignmentsview"; // form ID
var EW_PAGE_ID = CCEStudentAssignments_view.PageID; // for backward compatibility

// extend page with Form_CustomValidate function
CCEStudentAssignments_view.Form_CustomValidate =  
 function(fobj) { // DO NOT CHANGE THIS LINE!

 	// Your custom validation code here, return false if invalid. 
 	return true;
 }
<?php if (EW_CLIENT_VALIDATE) { ?>
CCEStudentAssignments_view.ValidateRequired = true; // uses JavaScript validation
<?php } else { ?>
CCEStudentAssignments_view.ValidateRequired = false; // no JavaScript validation
<?php } ?>

//-->
</script>
<script language="JavaScript" type="text/javascript">
<!--

// Write your client script here, no need to add script tags.
// To include another .js script, use:
// ew_ClientScriptInclude("my_javascript.js"); 
//-->

</script>
<?php } ?>
<p><span class="phpmaker"><?php echo $Language->Phrase("View") ?>&nbsp;<?php echo $Language->Phrase("TblTypeTABLE") ?><?php echo $CCEStudentAssignments->TableCaption() ?>
<?php if ($CCEStudentAssignments->Export == "") { ?>
&nbsp;&nbsp;<a href="<?php echo $CCEStudentAssignments_view->ExportPrintUrl ?>"><img src="images/print.gif" alt="<?php echo ew_HtmlEncode($Language->Phrase("PrinterFriendly")) ?>" title="<?php echo ew_HtmlEncode($Language->Phrase("PrinterFriendly")) ?>" width="16" height="16" border="0"></a>
&nbsp;&nbsp;<a href="<?php echo $CCEStudentAssignments_view->ExportExcelUrl ?>"><img src='images/exportxls.gif' alt='<?php echo ew_HtmlEncode($Language->Phrase("ExportToExcel")) ?>' title='<?php echo ew_HtmlEncode($Language->Phrase("ExportToExcel")) ?>' width='16' height='16' border='0'></a>
&nbsp;&nbsp;<a href="<?php echo $CCEStudentAssignments_view->ExportWordUrl ?>"><img src='images/exportdoc.gif' alt='<?php echo ew_HtmlEncode($Language->Phrase("ExportToWord")) ?>' title='<?php echo ew_HtmlEncode($Language->Phrase("ExportToWord")) ?>' width='16' height='16' border='0'></a>
&nbsp;&nbsp;<a name="emf_CCEStudentAssignments" id="emf_CCEStudentAssignments" href="javascript:void(0);" onclick="ew_EmailDialogShow({lnk:'emf_CCEStudentAssignments',hdr:ewLanguage.Phrase('ExportToEmail'),key:<?php echo ew_ArrayToJsonAttr($CCEStudentAssignments_view->arRecKey) ?>,sel:false});"><img src='images/exportemail.gif' alt='<?php echo ew_HtmlEncode($Language->Phrase("ExportToEmail")) ?>' title='<?php echo ew_HtmlEncode($Language->Phrase("ExportToEmail")) ?>' width='16' height='16' border='0'></a>
<?php } ?>
<br><br>
<?php if ($CCEStudentAssignments->Export == "") { ?>
<a href="<?php echo $CCEStudentAssignments_view->ListUrl ?>"><?php echo $Language->Phrase("BackToList") ?></a>&nbsp;
<?php } ?>
</span></p>
<?php
if (EW_DEBUG_ENABLED)
	echo ew_DebugMsg();
$CCEStudentAssignments_view->ShowMessage();
?>
<p>
<?php if ($CCEStudentAssignments->Export == "") { ?>
<form name="ewpagerform" id="ewpagerform" class="ewForm" action="<?php echo ew_CurrentPage() ?>">
<table border="0" cellspacing="0" cellpadding="0" class="ewPager">
	<tr>
		<td nowrap>
<?php if (!isset($CCEStudentAssignments_view->Pager)) $CCEStudentAssignments_view->Pager = new cPrevNextPager($CCEStudentAssignments_view->lStartRec, $CCEStudentAssignments_view->lDisplayRecs, $CCEStudentAssignments_view->lTotalRecs) ?>
<?php if ($CCEStudentAssignments_view->Pager->RecordCount > 0) { ?>
	<table border="0" cellspacing="0" cellpadding="0"><tr><td><span class="phpmaker"><?php echo $Language->Phrase("Page") ?>&nbsp;</span></td>
<!--first page button-->
	<?php if ($CCEStudentAssignments_view->Pager->FirstButton->Enabled) { ?>
	<td><a href="<?php echo $CCEStudentAssignments_view->PageUrl() ?>start=<?php echo $CCEStudentAssignments_view->Pager->FirstButton->Start ?>"><img src="images/first.gif" alt="<?php echo $Language->Phrase("PagerFirst") ?>" width="16" height="16" border="0"></a></td>
	<?php } else { ?>
	<td><img src="images/firstdisab.gif" alt="<?php echo $Language->Phrase("PagerFirst") ?>" width="16" height="16" border="0"></td>
	<?php } ?>
<!--previous page button-->
	<?php if ($CCEStudentAssignments_view->Pager->PrevButton->Enabled) { ?>
	<td><a href="<?php echo $CCEStudentAssignments_view->PageUrl() ?>start=<?php echo $CCEStudentAssignments_view->Pager->PrevButton->Start ?>"><img src="images/prev.gif" alt="<?php echo $Language->Phrase("PagerPrevious") ?>" width="16" height="16" border="0"></a></td>
	<?php } else { ?>
	<td><img src="images/prevdisab.gif" alt="<?php echo $Language->Phrase("PagerPrevious") ?>" width="16" height="16" border="0"></td>
	<?php } ?>
<!--current page number-->
	<td><input type="text" name="<?php echo EW_TABLE_PAGE_NO ?>" id="<?php echo EW_TABLE_PAGE_NO ?>" value="<?php echo $CCEStudentAssignments_view->Pager->CurrentPage ?>" size="4"></td>
<!--next page button-->
	<?php if ($CCEStudentAssignments_view->Pager->NextButton->Enabled) { ?>
	<td><a href="<?php echo $CCEStudentAssignments_view->PageUrl() ?>start=<?php echo $CCEStudentAssignments_view->Pager->NextButton->Start ?>"><img src="images/next.gif" alt="<?php echo $Language->Phrase("PagerNext") ?>" width="16" height="16" border="0"></a></td>	
	<?php } else { ?>
	<td><img src="images/nextdisab.gif" alt="<?php echo $Language->Phrase("PagerNext") ?>" width="16" height="16" border="0"></td>
	<?php } ?>
<!--last page button-->
	<?php if ($CCEStudentAssignments_view->Pager->LastButton->Enabled) { ?>
	<td><a href="<?php echo $CCEStudentAssignments_view->PageUrl() ?>start=<?php echo $CCEStudentAssignments_view->Pager->LastButton->Start ?>"><img src="images/last.gif" alt="<?php echo $Language->Phrase("PagerLast") ?>" width="16" height="16" border="0"></a></td>	
	<?php } else { ?>
	<td><img src="images/lastdisab.gif" alt="<?php echo $Language->Phrase("PagerLast") ?>" width="16" height="16" border="0"></td>
	<?php } ?>
	<td><span class="phpmaker">&nbsp;<?php echo $Language->Phrase("of") ?>&nbsp;<?php echo $CCEStudentAssignments_view->Pager->PageCount ?></span></td>
	</tr></table>
<?php } else { ?>
	<?php if ($CCEStudentAssignments_view->sSrchWhere == "0=101") { ?>
	<span class="phpmaker"><?php echo $Language->Phrase("EnterSearchCriteria") ?></span>
	<?php } else { ?>
	<span class="phpmaker"><?php echo $Language->Phrase("NoRecord") ?></span>
	<?php } ?>
<?php } ?>
		</td>
	</tr>
</table>
</form>
<br>
<?php } ?>
<table cellspacing="0" class="ewGrid"><tr><td class="ewGridContent">
<div class="ewGridMiddlePanel">
<table cellspacing="0" class="ewTable">
<?php if ($CCEStudentAssignments->CCEStudentID->Visible) { // CCEStudentID ?>
	<tr<?php echo $CCEStudentAssignments->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $CCEStudentAssignments->CCEStudentID->FldCaption() ?></td>
		<td<?php echo $CCEStudentAssignments->CCEStudentID->CellAttributes() ?>>
<div<?php echo $CCEStudentAssignments->CCEStudentID->ViewAttributes() ?>><?php echo $CCEStudentAssignments->CCEStudentID->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($CCEStudentAssignments->CCEAssignmentID->Visible) { // CCEAssignmentID ?>
	<tr<?php echo $CCEStudentAssignments->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $CCEStudentAssignments->CCEAssignmentID->FldCaption() ?></td>
		<td<?php echo $CCEStudentAssignments->CCEAssignmentID->CellAttributes() ?>>
<div<?php echo $CCEStudentAssignments->CCEAssignmentID->ViewAttributes() ?>><?php echo $CCEStudentAssignments->CCEAssignmentID->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($CCEStudentAssignments->AssignmentFile1->Visible) { // AssignmentFile1 ?>
	<tr<?php echo $CCEStudentAssignments->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $CCEStudentAssignments->AssignmentFile1->FldCaption() ?></td>
		<td<?php echo $CCEStudentAssignments->AssignmentFile1->CellAttributes() ?>>
<?php if ($CCEStudentAssignments->AssignmentFile1->HrefValue <> "" || $CCEStudentAssignments->AssignmentFile1->TooltipValue <> "") { ?>
<?php if (!empty($CCEStudentAssignments->AssignmentFile1->Upload->DbValue)) { ?>
<a href="<?php echo $CCEStudentAssignments->AssignmentFile1->HrefValue ?>"><?php echo $CCEStudentAssignments->AssignmentFile1->ViewValue ?></a>
<?php } elseif (!in_array($CCEStudentAssignments->CurrentAction, array("I", "edit", "gridedit"))) { ?>	
&nbsp;
<?php } ?>
<?php } else { ?>
<?php if (!empty($CCEStudentAssignments->AssignmentFile1->Upload->DbValue)) { ?>
<?php echo $CCEStudentAssignments->AssignmentFile1->ViewValue ?>
<?php } elseif (!in_array($CCEStudentAssignments->CurrentAction, array("I", "edit", "gridedit"))) { ?>	
&nbsp;
<?php } ?>
<?php } ?>
</td>
	</tr>
<?php } ?>
<?php if ($CCEStudentAssignments->AssignmentFile2->Visible) { // AssignmentFile2 ?>
	<tr<?php echo $CCEStudentAssignments->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $CCEStudentAssignments->AssignmentFile2->FldCaption() ?></td>
		<td<?php echo $CCEStudentAssignments->AssignmentFile2->CellAttributes() ?>>
<?php if ($CCEStudentAssignments->AssignmentFile2->HrefValue <> "" || $CCEStudentAssignments->AssignmentFile2->TooltipValue <> "") { ?>
<?php if (!empty($CCEStudentAssignments->AssignmentFile2->Upload->DbValue)) { ?>
<a href="<?php echo $CCEStudentAssignments->AssignmentFile2->HrefValue ?>"><?php echo $CCEStudentAssignments->AssignmentFile2->ViewValue ?></a>
<?php } elseif (!in_array($CCEStudentAssignments->CurrentAction, array("I", "edit", "gridedit"))) { ?>	
&nbsp;
<?php } ?>
<?php } else { ?>
<?php if (!empty($CCEStudentAssignments->AssignmentFile2->Upload->DbValue)) { ?>
<?php echo $CCEStudentAssignments->AssignmentFile2->ViewValue ?>
<?php } elseif (!in_array($CCEStudentAssignments->CurrentAction, array("I", "edit", "gridedit"))) { ?>	
&nbsp;
<?php } ?>
<?php } ?>
</td>
	</tr>
<?php } ?>
<?php if ($CCEStudentAssignments->AssignmentFile3->Visible) { // AssignmentFile3 ?>
	<tr<?php echo $CCEStudentAssignments->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $CCEStudentAssignments->AssignmentFile3->FldCaption() ?></td>
		<td<?php echo $CCEStudentAssignments->AssignmentFile3->CellAttributes() ?>>
<?php if ($CCEStudentAssignments->AssignmentFile3->HrefValue <> "" || $CCEStudentAssignments->AssignmentFile3->TooltipValue <> "") { ?>
<?php if (!empty($CCEStudentAssignments->AssignmentFile3->Upload->DbValue)) { ?>
<a href="<?php echo $CCEStudentAssignments->AssignmentFile3->HrefValue ?>"><?php echo $CCEStudentAssignments->AssignmentFile3->ViewValue ?></a>
<?php } elseif (!in_array($CCEStudentAssignments->CurrentAction, array("I", "edit", "gridedit"))) { ?>	
&nbsp;
<?php } ?>
<?php } else { ?>
<?php if (!empty($CCEStudentAssignments->AssignmentFile3->Upload->DbValue)) { ?>
<?php echo $CCEStudentAssignments->AssignmentFile3->ViewValue ?>
<?php } elseif (!in_array($CCEStudentAssignments->CurrentAction, array("I", "edit", "gridedit"))) { ?>	
&nbsp;
<?php } ?>
<?php } ?>
</td>
	</tr>
<?php } ?>
<?php if ($CCEStudentAssignments->AssignmentFile4->Visible) { // AssignmentFile4 ?>
	<tr<?php echo $CCEStudentAssignments->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $CCEStudentAssignments->AssignmentFile4->FldCaption() ?></td>
		<td<?php echo $CCEStudentAssignments->AssignmentFile4->CellAttributes() ?>>
<?php if ($CCEStudentAssignments->AssignmentFile4->HrefValue <> "" || $CCEStudentAssignments->AssignmentFile4->TooltipValue <> "") { ?>
<?php if (!empty($CCEStudentAssignments->AssignmentFile4->Upload->DbValue)) { ?>
<a href="<?php echo $CCEStudentAssignments->AssignmentFile4->HrefValue ?>"><?php echo $CCEStudentAssignments->AssignmentFile4->ViewValue ?></a>
<?php } elseif (!in_array($CCEStudentAssignments->CurrentAction, array("I", "edit", "gridedit"))) { ?>	
&nbsp;
<?php } ?>
<?php } else { ?>
<?php if (!empty($CCEStudentAssignments->AssignmentFile4->Upload->DbValue)) { ?>
<?php echo $CCEStudentAssignments->AssignmentFile4->ViewValue ?>
<?php } elseif (!in_array($CCEStudentAssignments->CurrentAction, array("I", "edit", "gridedit"))) { ?>	
&nbsp;
<?php } ?>
<?php } ?>
</td>
	</tr>
<?php } ?>
<?php if ($CCEStudentAssignments->AssignmentFile5->Visible) { // AssignmentFile5 ?>
	<tr<?php echo $CCEStudentAssignments->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $CCEStudentAssignments->AssignmentFile5->FldCaption() ?></td>
		<td<?php echo $CCEStudentAssignments->AssignmentFile5->CellAttributes() ?>>
<?php if ($CCEStudentAssignments->AssignmentFile5->HrefValue <> "" || $CCEStudentAssignments->AssignmentFile5->TooltipValue <> "") { ?>
<?php if (!empty($CCEStudentAssignments->AssignmentFile5->Upload->DbValue)) { ?>
<a href="<?php echo $CCEStudentAssignments->AssignmentFile5->HrefValue ?>"><?php echo $CCEStudentAssignments->AssignmentFile5->ViewValue ?></a>
<?php } elseif (!in_array($CCEStudentAssignments->CurrentAction, array("I", "edit", "gridedit"))) { ?>	
&nbsp;
<?php } ?>
<?php } else { ?>
<?php if (!empty($CCEStudentAssignments->AssignmentFile5->Upload->DbValue)) { ?>
<?php echo $CCEStudentAssignments->AssignmentFile5->ViewValue ?>
<?php } elseif (!in_array($CCEStudentAssignments->CurrentAction, array("I", "edit", "gridedit"))) { ?>	
&nbsp;
<?php } ?>
<?php } ?>
</td>
	</tr>
<?php } ?>
<?php if ($CCEStudentAssignments->Comments->Visible) { // Comments ?>
	<tr<?php echo $CCEStudentAssignments->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $CCEStudentAssignments->Comments->FldCaption() ?></td>
		<td<?php echo $CCEStudentAssignments->Comments->CellAttributes() ?>>
<div<?php echo $CCEStudentAssignments->Comments->ViewAttributes() ?>><?php echo $CCEStudentAssignments->Comments->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($CCEStudentAssignments->DateSubmitted->Visible) { // DateSubmitted ?>
	<tr<?php echo $CCEStudentAssignments->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $CCEStudentAssignments->DateSubmitted->FldCaption() ?></td>
		<td<?php echo $CCEStudentAssignments->DateSubmitted->CellAttributes() ?>>
<div<?php echo $CCEStudentAssignments->DateSubmitted->ViewAttributes() ?>><?php echo $CCEStudentAssignments->DateSubmitted->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($CCEStudentAssignments->Passed->Visible) { // Passed ?>
	<tr<?php echo $CCEStudentAssignments->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $CCEStudentAssignments->Passed->FldCaption() ?></td>
		<td<?php echo $CCEStudentAssignments->Passed->CellAttributes() ?>>
<div<?php echo $CCEStudentAssignments->Passed->ViewAttributes() ?>><?php echo $CCEStudentAssignments->Passed->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($CCEStudentAssignments->RulingCode->Visible) { // RulingCode ?>
	<tr<?php echo $CCEStudentAssignments->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $CCEStudentAssignments->RulingCode->FldCaption() ?></td>
		<td<?php echo $CCEStudentAssignments->RulingCode->CellAttributes() ?>>
<div<?php echo $CCEStudentAssignments->RulingCode->ViewAttributes() ?>><?php echo $CCEStudentAssignments->RulingCode->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($CCEStudentAssignments->AssignmentScore->Visible) { // AssignmentScore ?>
	<tr<?php echo $CCEStudentAssignments->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $CCEStudentAssignments->AssignmentScore->FldCaption() ?></td>
		<td<?php echo $CCEStudentAssignments->AssignmentScore->CellAttributes() ?>>
<div<?php echo $CCEStudentAssignments->AssignmentScore->ViewAttributes() ?>><?php echo $CCEStudentAssignments->AssignmentScore->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($CCEStudentAssignments->ScoredBy->Visible) { // ScoredBy ?>
	<tr<?php echo $CCEStudentAssignments->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $CCEStudentAssignments->ScoredBy->FldCaption() ?></td>
		<td<?php echo $CCEStudentAssignments->ScoredBy->CellAttributes() ?>>
<div<?php echo $CCEStudentAssignments->ScoredBy->ViewAttributes() ?>><?php echo $CCEStudentAssignments->ScoredBy->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($CCEStudentAssignments->Remarks->Visible) { // Remarks ?>
	<tr<?php echo $CCEStudentAssignments->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $CCEStudentAssignments->Remarks->FldCaption() ?></td>
		<td<?php echo $CCEStudentAssignments->Remarks->CellAttributes() ?>>
<div<?php echo $CCEStudentAssignments->Remarks->ViewAttributes() ?>><?php echo $CCEStudentAssignments->Remarks->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($CCEStudentAssignments->LastFeedback->Visible) { // LastFeedback ?>
	<tr<?php echo $CCEStudentAssignments->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $CCEStudentAssignments->LastFeedback->FldCaption() ?></td>
		<td<?php echo $CCEStudentAssignments->LastFeedback->CellAttributes() ?>>
<div<?php echo $CCEStudentAssignments->LastFeedback->ViewAttributes() ?>><?php echo $CCEStudentAssignments->LastFeedback->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($CCEStudentAssignments->MsgAttachment->Visible) { // MsgAttachment ?>
	<tr<?php echo $CCEStudentAssignments->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $CCEStudentAssignments->MsgAttachment->FldCaption() ?></td>
		<td<?php echo $CCEStudentAssignments->MsgAttachment->CellAttributes() ?>>
<?php if ($CCEStudentAssignments->MsgAttachment->HrefValue <> "" || $CCEStudentAssignments->MsgAttachment->TooltipValue <> "") { ?>
<?php if (!empty($CCEStudentAssignments->MsgAttachment->Upload->DbValue)) { ?>
<a href="<?php echo $CCEStudentAssignments->MsgAttachment->HrefValue ?>"><?php echo $CCEStudentAssignments->MsgAttachment->ViewValue ?></a>
<?php } elseif (!in_array($CCEStudentAssignments->CurrentAction, array("I", "edit", "gridedit"))) { ?>	
&nbsp;
<?php } ?>
<?php } else { ?>
<?php if (!empty($CCEStudentAssignments->MsgAttachment->Upload->DbValue)) { ?>
<?php echo $CCEStudentAssignments->MsgAttachment->ViewValue ?>
<?php } elseif (!in_array($CCEStudentAssignments->CurrentAction, array("I", "edit", "gridedit"))) { ?>	
&nbsp;
<?php } ?>
<?php } ?>
</td>
	</tr>
<?php } ?>
<?php if ($CCEStudentAssignments->Extended->Visible) { // Extended ?>
	<tr<?php echo $CCEStudentAssignments->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $CCEStudentAssignments->Extended->FldCaption() ?></td>
		<td<?php echo $CCEStudentAssignments->Extended->CellAttributes() ?>>
<div<?php echo $CCEStudentAssignments->Extended->ViewAttributes() ?>><?php echo $CCEStudentAssignments->Extended->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($CCEStudentAssignments->References->Visible) { // References ?>
	<tr<?php echo $CCEStudentAssignments->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $CCEStudentAssignments->References->FldCaption() ?></td>
		<td<?php echo $CCEStudentAssignments->References->CellAttributes() ?>>
<div<?php echo $CCEStudentAssignments->References->ViewAttributes() ?>><?php echo $CCEStudentAssignments->References->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($CCEStudentAssignments->TempR->Visible) { // TempR ?>
	<tr<?php echo $CCEStudentAssignments->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $CCEStudentAssignments->TempR->FldCaption() ?></td>
		<td<?php echo $CCEStudentAssignments->TempR->CellAttributes() ?>>
<div<?php echo $CCEStudentAssignments->TempR->ViewAttributes() ?>><?php echo $CCEStudentAssignments->TempR->ViewValue ?></div></td>
	</tr>
<?php } ?>
<?php if ($CCEStudentAssignments->ResubmitDateOverride->Visible) { // ResubmitDateOverride ?>
	<tr<?php echo $CCEStudentAssignments->RowAttributes() ?>>
		<td class="ewTableHeader"><?php echo $CCEStudentAssignments->ResubmitDateOverride->FldCaption() ?></td>
		<td<?php echo $CCEStudentAssignments->ResubmitDateOverride->CellAttributes() ?>>
<div<?php echo $CCEStudentAssignments->ResubmitDateOverride->ViewAttributes() ?>><?php echo $CCEStudentAssignments->ResubmitDateOverride->ViewValue ?></div></td>
	</tr>
<?php } ?>
</table>
</div>
</td></tr></table>
<?php if ($CCEStudentAssignments->Export == "") { ?>
<br>
<form name="ewpagerform" id="ewpagerform" class="ewForm" action="<?php echo ew_CurrentPage() ?>">
<table border="0" cellspacing="0" cellpadding="0" class="ewPager">
	<tr>
		<td nowrap>
<?php if (!isset($CCEStudentAssignments_view->Pager)) $CCEStudentAssignments_view->Pager = new cPrevNextPager($CCEStudentAssignments_view->lStartRec, $CCEStudentAssignments_view->lDisplayRecs, $CCEStudentAssignments_view->lTotalRecs) ?>
<?php if ($CCEStudentAssignments_view->Pager->RecordCount > 0) { ?>
	<table border="0" cellspacing="0" cellpadding="0"><tr><td><span class="phpmaker"><?php echo $Language->Phrase("Page") ?>&nbsp;</span></td>
<!--first page button-->
	<?php if ($CCEStudentAssignments_view->Pager->FirstButton->Enabled) { ?>
	<td><a href="<?php echo $CCEStudentAssignments_view->PageUrl() ?>start=<?php echo $CCEStudentAssignments_view->Pager->FirstButton->Start ?>"><img src="images/first.gif" alt="<?php echo $Language->Phrase("PagerFirst") ?>" width="16" height="16" border="0"></a></td>
	<?php } else { ?>
	<td><img src="images/firstdisab.gif" alt="<?php echo $Language->Phrase("PagerFirst") ?>" width="16" height="16" border="0"></td>
	<?php } ?>
<!--previous page button-->
	<?php if ($CCEStudentAssignments_view->Pager->PrevButton->Enabled) { ?>
	<td><a href="<?php echo $CCEStudentAssignments_view->PageUrl() ?>start=<?php echo $CCEStudentAssignments_view->Pager->PrevButton->Start ?>"><img src="images/prev.gif" alt="<?php echo $Language->Phrase("PagerPrevious") ?>" width="16" height="16" border="0"></a></td>
	<?php } else { ?>
	<td><img src="images/prevdisab.gif" alt="<?php echo $Language->Phrase("PagerPrevious") ?>" width="16" height="16" border="0"></td>
	<?php } ?>
<!--current page number-->
	<td><input type="text" name="<?php echo EW_TABLE_PAGE_NO ?>" id="<?php echo EW_TABLE_PAGE_NO ?>" value="<?php echo $CCEStudentAssignments_view->Pager->CurrentPage ?>" size="4"></td>
<!--next page button-->
	<?php if ($CCEStudentAssignments_view->Pager->NextButton->Enabled) { ?>
	<td><a href="<?php echo $CCEStudentAssignments_view->PageUrl() ?>start=<?php echo $CCEStudentAssignments_view->Pager->NextButton->Start ?>"><img src="images/next.gif" alt="<?php echo $Language->Phrase("PagerNext") ?>" width="16" height="16" border="0"></a></td>	
	<?php } else { ?>
	<td><img src="images/nextdisab.gif" alt="<?php echo $Language->Phrase("PagerNext") ?>" width="16" height="16" border="0"></td>
	<?php } ?>
<!--last page button-->
	<?php if ($CCEStudentAssignments_view->Pager->LastButton->Enabled) { ?>
	<td><a href="<?php echo $CCEStudentAssignments_view->PageUrl() ?>start=<?php echo $CCEStudentAssignments_view->Pager->LastButton->Start ?>"><img src="images/last.gif" alt="<?php echo $Language->Phrase("PagerLast") ?>" width="16" height="16" border="0"></a></td>	
	<?php } else { ?>
	<td><img src="images/lastdisab.gif" alt="<?php echo $Language->Phrase("PagerLast") ?>" width="16" height="16" border="0"></td>
	<?php } ?>
	<td><span class="phpmaker">&nbsp;<?php echo $Language->Phrase("of") ?>&nbsp;<?php echo $CCEStudentAssignments_view->Pager->PageCount ?></span></td>
	</tr></table>
<?php } else { ?>
	<?php if ($CCEStudentAssignments_view->sSrchWhere == "0=101") { ?>
	<span class="phpmaker"><?php echo $Language->Phrase("EnterSearchCriteria") ?></span>
	<?php } else { ?>
	<span class="phpmaker"><?php echo $Language->Phrase("NoRecord") ?></span>
	<?php } ?>
<?php } ?>
		</td>
	</tr>
</table>
</form>
<?php } ?>
<p>
<?php if ($CCEStudentAssignments->Export == "") { ?>
<script language="JavaScript" type="text/javascript">
<!--

// Write your table-specific startup script here
// document.write("page loaded");
//-->

</script>
<?php } ?>
<?php include "footer.php" ?>
<?php
$CCEStudentAssignments_view->Page_Terminate();
?>
<?php

//
// Page class
//
class cCCEStudentAssignments_view {

	// Page ID
	var $PageID = 'view';

	// Table name
	var $TableName = 'CCEStudentAssignments';

	// Page object name
	var $PageObjName = 'CCEStudentAssignments_view';

	// Page name
	function PageName() {
		return ew_CurrentPage();
	}

	// Page URL
	function PageUrl() {
		$PageUrl = ew_CurrentPage() . "?";
		global $CCEStudentAssignments;
		if ($CCEStudentAssignments->UseTokenInUrl) $PageUrl .= "t=" . $CCEStudentAssignments->TableVar . "&"; // Add page token
		return $PageUrl;
	}

	// Page URLs
	var $AddUrl;
	var $EditUrl;
	var $CopyUrl;
	var $DeleteUrl;
	var $ViewUrl;
	var $ListUrl;

	// Export URLs
	var $ExportPrintUrl;
	var $ExportHtmlUrl;
	var $ExportExcelUrl;
	var $ExportWordUrl;
	var $ExportXmlUrl;
	var $ExportCsvUrl;

	// Update URLs
	var $InlineAddUrl;
	var $InlineCopyUrl;
	var $InlineEditUrl;
	var $GridAddUrl;
	var $GridEditUrl;
	var $MultiDeleteUrl;
	var $MultiUpdateUrl;

	// Message
	function getMessage() {
		return @$_SESSION[EW_SESSION_MESSAGE];
	}

	function setMessage($v) {
		if (@$_SESSION[EW_SESSION_MESSAGE] <> "") { // Append
			$_SESSION[EW_SESSION_MESSAGE] .= "<br>" . $v;
		} else {
			$_SESSION[EW_SESSION_MESSAGE] = $v;
		}
	}

	// Show message
	function ShowMessage() {
		$sMessage = $this->getMessage();
		$this->Message_Showing($sMessage);
		if ($sMessage <> "") { // Message in Session, display
			echo "<p><span class=\"ewMessage\">" . $sMessage . "</span></p>";
			$_SESSION[EW_SESSION_MESSAGE] = ""; // Clear message in Session
		}
	}

	// Validate page request
	function IsPageRequest() {
		global $objForm, $CCEStudentAssignments;
		if ($CCEStudentAssignments->UseTokenInUrl) {
			if ($objForm)
				return ($CCEStudentAssignments->TableVar == $objForm->GetValue("t"));
			if (@$_GET["t"] <> "")
				return ($CCEStudentAssignments->TableVar == $_GET["t"]);
		} else {
			return TRUE;
		}
	}

	//
	// Page class constructor
	//
	function __construct() {
		global $conn, $Language;

		// Language object
		$Language = new cLanguage();

		// Table object (CCEStudentAssignments)
		$GLOBALS["CCEStudentAssignments"] = new cCCEStudentAssignments();

		// Table object (CCEAssignments)
		$GLOBALS['CCEAssignments'] = new cCCEAssignments();

		// Table object (CCEFacilitatorUsers)
		$GLOBALS['CCEFacilitatorUsers'] = new cCCEFacilitatorUsers();

		// Table object (CCEStudents)
		$GLOBALS['CCEStudents'] = new cCCEStudents();

		// Page ID
		if (!defined("EW_PAGE_ID"))
			define("EW_PAGE_ID", 'view', TRUE);

		// Table name (for backward compatibility)
		if (!defined("EW_TABLE_NAME"))
			define("EW_TABLE_NAME", 'CCEStudentAssignments', TRUE);

		// Start timer
		$GLOBALS["gsTimer"] = new cTimer();

		// Open connection
		$conn = ew_Connect();
	}

	// 
	//  Page_Init
	//
	function Page_Init() {
		global $gsExport, $gsExportFile, $UserProfile, $Language, $Security, $objForm;
		global $CCEStudentAssignments;

		// Security
		$Security = new cAdvancedSecurity();
		if (!$Security->IsLoggedIn()) $Security->AutoLogin();
		if (!$Security->IsLoggedIn()) {
			$Security->SaveLastUrl();
			$this->Page_Terminate("login.php");
		}

		// Get export parameters
		if (@$_GET["export"] <> "") {
			$CCEStudentAssignments->Export = $_GET["export"];
		} elseif (ew_IsHttpPost()) {
			if (@$_POST["exporttype"] <> "")
				$CCEStudentAssignments->Export = $_POST["exporttype"];
		} else {
			$CCEStudentAssignments->setExportReturnUrl(ew_CurrentUrl());
		}
		$gsExport = $CCEStudentAssignments->Export; // Get export parameter, used in header
		$gsExportFile = $CCEStudentAssignments->TableVar; // Get export file, used in header
		if (@$_GET["CCEStudentAssigID"] <> "") {
			if ($gsExportFile <> "") $gsExportFile .= "_";
			$gsExportFile .= ew_StripSlashes($_GET["CCEStudentAssigID"]);
		}
		if ($CCEStudentAssignments->Export == "excel") {
			header('Content-Type: application/vnd.ms-excel');
			header('Content-Disposition: attachment; filename=' . $gsExportFile .'.xls');
		}
		if ($CCEStudentAssignments->Export == "word") {
			header('Content-Type: application/vnd.ms-word');
			header('Content-Disposition: attachment; filename=' . $gsExportFile .'.doc');
		}

		// Global Page Loading event (in userfn*.php)
		Page_Loading();

		// Page Load event
		$this->Page_Load();
	}

	//
	// Page_Terminate
	//
	function Page_Terminate($url = "") {
		global $conn;

		// Page Unload event
		$this->Page_Unload();

		// Global Page Unloaded event (in userfn*.php)
		Page_Unloaded();

		 // Close connection
		$conn->Close();

		// Go to URL if specified
		$this->Page_Redirecting($url);
		if ($url <> "") {
			if (!EW_DEBUG_ENABLED && ob_get_length())
				ob_end_clean();
			header("Location: " . $url);
		}
		exit();
	}
	var $lDisplayRecs = 1;
	var $lStartRec;
	var $lStopRec;
	var $lTotalRecs = 0;
	var $lRecRange = 10;
	var $lRecCnt;
	var $arRecKey = array();

	//
	// Page main
	//
	function Page_Main() {
		global $Language, $CCEStudentAssignments;

		// Load current record
		$bLoadCurrentRecord = FALSE;
		$sReturnUrl = "";
		$bMatchRecord = FALSE;
		if ($this->IsPageRequest()) { // Validate request
			if (@$_GET["CCEStudentAssigID"] <> "") {
				$CCEStudentAssignments->CCEStudentAssigID->setQueryStringValue($_GET["CCEStudentAssigID"]);
				$this->arRecKey["CCEStudentAssigID"] = $CCEStudentAssignments->CCEStudentAssigID->QueryStringValue;
			} else {
				$bLoadCurrentRecord = TRUE;
			}

			// Get action
			$CCEStudentAssignments->CurrentAction = "I"; // Display form
			switch ($CCEStudentAssignments->CurrentAction) {
				case "I": // Get a record to display
					$this->lStartRec = 1; // Initialize start position
					if ($rs = $this->LoadRecordset()) // Load records
						$this->lTotalRecs = $rs->RecordCount(); // Get record count
					if ($this->lTotalRecs <= 0) { // No record found
						$this->setMessage($Language->Phrase("NoRecord")); // Set no record message
						$this->Page_Terminate("CCEStudentAssignmentslist.php"); // Return to list page
					} elseif ($bLoadCurrentRecord) { // Load current record position
						$this->SetUpStartRec(); // Set up start record position

						// Point to current record
						if (intval($this->lStartRec) <= intval($this->lTotalRecs)) {
							$bMatchRecord = TRUE;
							$rs->Move($this->lStartRec-1);
						}
					} else { // Match key values
						while (!$rs->EOF) {
							if (strval($CCEStudentAssignments->CCEStudentAssigID->CurrentValue) == strval($rs->fields('CCEStudentAssigID'))) {
								$CCEStudentAssignments->setStartRecordNumber($this->lStartRec); // Save record position
								$bMatchRecord = TRUE;
								break;
							} else {
								$this->lStartRec++;
								$rs->MoveNext();
							}
						}
					}
					if (!$bMatchRecord) {
						$this->setMessage($Language->Phrase("NoRecord")); // Set no record message
						$sReturnUrl = "CCEStudentAssignmentslist.php"; // No matching record, return to list
					} else {
						$this->LoadRowValues($rs); // Load row values
					}
			}

			// Export data only
			if (in_array($CCEStudentAssignments->Export, array("html","word","excel","xml","csv","email"))) {
				$this->ExportData();
				if ($CCEStudentAssignments->Export <> "email")
					$this->Page_Terminate(); // Terminate response
				exit();
			}
		} else {
			$sReturnUrl = "CCEStudentAssignmentslist.php"; // Not page request, return to list
		}
		if ($sReturnUrl <> "")
			$this->Page_Terminate($sReturnUrl);

		// Render row
		$CCEStudentAssignments->RowType = EW_ROWTYPE_VIEW;
		$this->RenderRow();
	}

	// Set up starting record parameters
	function SetUpStartRec() {
		global $CCEStudentAssignments;
		if ($this->lDisplayRecs == 0)
			return;
		if ($this->IsPageRequest()) { // Validate request
			if (@$_GET[EW_TABLE_START_REC] <> "") { // Check for "start" parameter
				$this->lStartRec = $_GET[EW_TABLE_START_REC];
				$CCEStudentAssignments->setStartRecordNumber($this->lStartRec);
			} elseif (@$_GET[EW_TABLE_PAGE_NO] <> "") {
				$this->nPageNo = $_GET[EW_TABLE_PAGE_NO];
				if (is_numeric($this->nPageNo)) {
					$this->lStartRec = ($this->nPageNo-1)*$this->lDisplayRecs+1;
					if ($this->lStartRec <= 0) {
						$this->lStartRec = 1;
					} elseif ($this->lStartRec >= intval(($this->lTotalRecs-1)/$this->lDisplayRecs)*$this->lDisplayRecs+1) {
						$this->lStartRec = intval(($this->lTotalRecs-1)/$this->lDisplayRecs)*$this->lDisplayRecs+1;
					}
					$CCEStudentAssignments->setStartRecordNumber($this->lStartRec);
				}
			}
		}
		$this->lStartRec = $CCEStudentAssignments->getStartRecordNumber();

		// Check if correct start record counter
		if (!is_numeric($this->lStartRec) || $this->lStartRec == "") { // Avoid invalid start record counter
			$this->lStartRec = 1; // Reset start record counter
			$CCEStudentAssignments->setStartRecordNumber($this->lStartRec);
		} elseif (intval($this->lStartRec) > intval($this->lTotalRecs)) { // Avoid starting record > total records
			$this->lStartRec = intval(($this->lTotalRecs-1)/$this->lDisplayRecs)*$this->lDisplayRecs+1; // Point to last page first record
			$CCEStudentAssignments->setStartRecordNumber($this->lStartRec);
		} elseif (($this->lStartRec-1) % $this->lDisplayRecs <> 0) {
			$this->lStartRec = intval(($this->lStartRec-1)/$this->lDisplayRecs)*$this->lDisplayRecs+1; // Point to page boundary
			$CCEStudentAssignments->setStartRecordNumber($this->lStartRec);
		}
	}

	// Load recordset
	function LoadRecordset($offset = -1, $rowcnt = -1) {
		global $conn, $CCEStudentAssignments;

		// Call Recordset Selecting event
		$CCEStudentAssignments->Recordset_Selecting($CCEStudentAssignments->CurrentFilter);

		// Load List page SQL
		$sSql = $CCEStudentAssignments->SelectSQL();
		if ($offset > -1 && $rowcnt > -1)
			$sSql .= " LIMIT $offset, $rowcnt";

		// Load recordset
		$rs = ew_LoadRecordset($sSql);

		// Call Recordset Selected event
		$CCEStudentAssignments->Recordset_Selected($rs);
		return $rs;
	}

	// Load row based on key values
	function LoadRow() {
		global $conn, $Security, $CCEStudentAssignments;
		$sFilter = $CCEStudentAssignments->KeyFilter();

		// Call Row Selecting event
		$CCEStudentAssignments->Row_Selecting($sFilter);

		// Load SQL based on filter
		$CCEStudentAssignments->CurrentFilter = $sFilter;
		$sSql = $CCEStudentAssignments->SQL();
		$res = FALSE;
		$rs = ew_LoadRecordset($sSql);
		if ($rs && !$rs->EOF) {
			$res = TRUE;
			$this->LoadRowValues($rs); // Load row values

			// Call Row Selected event
			$CCEStudentAssignments->Row_Selected($rs);
			$rs->Close();
		}
		return $res;
	}

	// Load row values from recordset
	function LoadRowValues(&$rs) {
		global $conn, $CCEStudentAssignments;
		$CCEStudentAssignments->CCEStudentAssigID->setDbValue($rs->fields('CCEStudentAssigID'));
		$CCEStudentAssignments->CCEStudentID->setDbValue($rs->fields('CCEStudentID'));
		$CCEStudentAssignments->CCEAssignmentID->setDbValue($rs->fields('CCEAssignmentID'));
		$CCEStudentAssignments->AssignmentFile1->Upload->DbValue = $rs->fields('AssignmentFile1');
		$CCEStudentAssignments->AssignmentFile2->Upload->DbValue = $rs->fields('AssignmentFile2');
		$CCEStudentAssignments->AssignmentFile3->Upload->DbValue = $rs->fields('AssignmentFile3');
		$CCEStudentAssignments->AssignmentFile4->Upload->DbValue = $rs->fields('AssignmentFile4');
		$CCEStudentAssignments->AssignmentFile5->Upload->DbValue = $rs->fields('AssignmentFile5');
		$CCEStudentAssignments->Comments->setDbValue($rs->fields('Comments'));
		$CCEStudentAssignments->DateSubmitted->setDbValue($rs->fields('DateSubmitted'));
		$CCEStudentAssignments->Completed->setDbValue($rs->fields('Completed'));
		$CCEStudentAssignments->Passed->setDbValue($rs->fields('Passed'));
		$CCEStudentAssignments->RulingCode->setDbValue($rs->fields('RulingCode'));
		$CCEStudentAssignments->AssignmentScore->setDbValue($rs->fields('AssignmentScore'));
		$CCEStudentAssignments->ScoredBy->setDbValue($rs->fields('ScoredBy'));
		$CCEStudentAssignments->Remarks->setDbValue($rs->fields('Remarks'));
		$CCEStudentAssignments->FeedbackMessageID->setDbValue($rs->fields('FeedbackMessageID'));
		$CCEStudentAssignments->LFSentTo->setDbValue($rs->fields('LFSentTo'));
		$CCEStudentAssignments->LastFeedback->setDbValue($rs->fields('LastFeedback'));
		$CCEStudentAssignments->MsgAttachment->Upload->DbValue = $rs->fields('MsgAttachment');
		$CCEStudentAssignments->Extended->setDbValue($rs->fields('Extended'));
		$CCEStudentAssignments->References->setDbValue($rs->fields('References'));
		$CCEStudentAssignments->TempR->setDbValue($rs->fields('TempR'));
		$CCEStudentAssignments->ResubmitDateOverride->setDbValue($rs->fields('ResubmitDateOverride'));
	}

	// Render row values based on field settings
	function RenderRow() {
		global $conn, $Security, $Language, $CCEStudentAssignments;

		// Initialize URLs
		$this->ExportPrintUrl = $this->PageUrl() . "export=print&" . "CCEStudentAssigID=" . urlencode($CCEStudentAssignments->CCEStudentAssigID->CurrentValue);
		$this->ExportHtmlUrl = $this->PageUrl() . "export=html&" . "CCEStudentAssigID=" . urlencode($CCEStudentAssignments->CCEStudentAssigID->CurrentValue);
		$this->ExportExcelUrl = $this->PageUrl() . "export=excel&" . "CCEStudentAssigID=" . urlencode($CCEStudentAssignments->CCEStudentAssigID->CurrentValue);
		$this->ExportWordUrl = $this->PageUrl() . "export=word&" . "CCEStudentAssigID=" . urlencode($CCEStudentAssignments->CCEStudentAssigID->CurrentValue);
		$this->ExportXmlUrl = $this->PageUrl() . "export=xml&" . "CCEStudentAssigID=" . urlencode($CCEStudentAssignments->CCEStudentAssigID->CurrentValue);
		$this->ExportCsvUrl = $this->PageUrl() . "export=csv&" . "CCEStudentAssigID=" . urlencode($CCEStudentAssignments->CCEStudentAssigID->CurrentValue);
		$this->AddUrl = $CCEStudentAssignments->AddUrl();
		$this->EditUrl = $CCEStudentAssignments->EditUrl();
		$this->CopyUrl = $CCEStudentAssignments->CopyUrl();
		$this->DeleteUrl = $CCEStudentAssignments->DeleteUrl();
		$this->ListUrl = $CCEStudentAssignments->ListUrl();

		// Call Row_Rendering event
		$CCEStudentAssignments->Row_Rendering();

		// Common render codes for all row types
		// CCEStudentID

		$CCEStudentAssignments->CCEStudentID->CellCssStyle = ""; $CCEStudentAssignments->CCEStudentID->CellCssClass = "";
		$CCEStudentAssignments->CCEStudentID->CellAttrs = array(); $CCEStudentAssignments->CCEStudentID->ViewAttrs = array(); $CCEStudentAssignments->CCEStudentID->EditAttrs = array();

		// CCEAssignmentID
		$CCEStudentAssignments->CCEAssignmentID->CellCssStyle = ""; $CCEStudentAssignments->CCEAssignmentID->CellCssClass = "";
		$CCEStudentAssignments->CCEAssignmentID->CellAttrs = array(); $CCEStudentAssignments->CCEAssignmentID->ViewAttrs = array(); $CCEStudentAssignments->CCEAssignmentID->EditAttrs = array();

		// AssignmentFile1
		$CCEStudentAssignments->AssignmentFile1->CellCssStyle = ""; $CCEStudentAssignments->AssignmentFile1->CellCssClass = "";
		$CCEStudentAssignments->AssignmentFile1->CellAttrs = array(); $CCEStudentAssignments->AssignmentFile1->ViewAttrs = array(); $CCEStudentAssignments->AssignmentFile1->EditAttrs = array();

		// AssignmentFile2
		$CCEStudentAssignments->AssignmentFile2->CellCssStyle = ""; $CCEStudentAssignments->AssignmentFile2->CellCssClass = "";
		$CCEStudentAssignments->AssignmentFile2->CellAttrs = array(); $CCEStudentAssignments->AssignmentFile2->ViewAttrs = array(); $CCEStudentAssignments->AssignmentFile2->EditAttrs = array();

		// AssignmentFile3
		$CCEStudentAssignments->AssignmentFile3->CellCssStyle = ""; $CCEStudentAssignments->AssignmentFile3->CellCssClass = "";
		$CCEStudentAssignments->AssignmentFile3->CellAttrs = array(); $CCEStudentAssignments->AssignmentFile3->ViewAttrs = array(); $CCEStudentAssignments->AssignmentFile3->EditAttrs = array();

		// AssignmentFile4
		$CCEStudentAssignments->AssignmentFile4->CellCssStyle = ""; $CCEStudentAssignments->AssignmentFile4->CellCssClass = "";
		$CCEStudentAssignments->AssignmentFile4->CellAttrs = array(); $CCEStudentAssignments->AssignmentFile4->ViewAttrs = array(); $CCEStudentAssignments->AssignmentFile4->EditAttrs = array();

		// AssignmentFile5
		$CCEStudentAssignments->AssignmentFile5->CellCssStyle = ""; $CCEStudentAssignments->AssignmentFile5->CellCssClass = "";
		$CCEStudentAssignments->AssignmentFile5->CellAttrs = array(); $CCEStudentAssignments->AssignmentFile5->ViewAttrs = array(); $CCEStudentAssignments->AssignmentFile5->EditAttrs = array();

		// Comments
		$CCEStudentAssignments->Comments->CellCssStyle = ""; $CCEStudentAssignments->Comments->CellCssClass = "";
		$CCEStudentAssignments->Comments->CellAttrs = array(); $CCEStudentAssignments->Comments->ViewAttrs = array(); $CCEStudentAssignments->Comments->EditAttrs = array();

		// DateSubmitted
		$CCEStudentAssignments->DateSubmitted->CellCssStyle = ""; $CCEStudentAssignments->DateSubmitted->CellCssClass = "";
		$CCEStudentAssignments->DateSubmitted->CellAttrs = array(); $CCEStudentAssignments->DateSubmitted->ViewAttrs = array(); $CCEStudentAssignments->DateSubmitted->EditAttrs = array();

		// Passed
		$CCEStudentAssignments->Passed->CellCssStyle = ""; $CCEStudentAssignments->Passed->CellCssClass = "";
		$CCEStudentAssignments->Passed->CellAttrs = array(); $CCEStudentAssignments->Passed->ViewAttrs = array(); $CCEStudentAssignments->Passed->EditAttrs = array();

		// RulingCode
		$CCEStudentAssignments->RulingCode->CellCssStyle = ""; $CCEStudentAssignments->RulingCode->CellCssClass = "";
		$CCEStudentAssignments->RulingCode->CellAttrs = array(); $CCEStudentAssignments->RulingCode->ViewAttrs = array(); $CCEStudentAssignments->RulingCode->EditAttrs = array();

		// AssignmentScore
		$CCEStudentAssignments->AssignmentScore->CellCssStyle = ""; $CCEStudentAssignments->AssignmentScore->CellCssClass = "";
		$CCEStudentAssignments->AssignmentScore->CellAttrs = array(); $CCEStudentAssignments->AssignmentScore->ViewAttrs = array(); $CCEStudentAssignments->AssignmentScore->EditAttrs = array();

		// ScoredBy
		$CCEStudentAssignments->ScoredBy->CellCssStyle = ""; $CCEStudentAssignments->ScoredBy->CellCssClass = "";
		$CCEStudentAssignments->ScoredBy->CellAttrs = array(); $CCEStudentAssignments->ScoredBy->ViewAttrs = array(); $CCEStudentAssignments->ScoredBy->EditAttrs = array();

		// Remarks
		$CCEStudentAssignments->Remarks->CellCssStyle = ""; $CCEStudentAssignments->Remarks->CellCssClass = "";
		$CCEStudentAssignments->Remarks->CellAttrs = array(); $CCEStudentAssignments->Remarks->ViewAttrs = array(); $CCEStudentAssignments->Remarks->EditAttrs = array();

		// LastFeedback
		$CCEStudentAssignments->LastFeedback->CellCssStyle = ""; $CCEStudentAssignments->LastFeedback->CellCssClass = "";
		$CCEStudentAssignments->LastFeedback->CellAttrs = array(); $CCEStudentAssignments->LastFeedback->ViewAttrs = array(); $CCEStudentAssignments->LastFeedback->EditAttrs = array();

		// MsgAttachment
		$CCEStudentAssignments->MsgAttachment->CellCssStyle = ""; $CCEStudentAssignments->MsgAttachment->CellCssClass = "";
		$CCEStudentAssignments->MsgAttachment->CellAttrs = array(); $CCEStudentAssignments->MsgAttachment->ViewAttrs = array(); $CCEStudentAssignments->MsgAttachment->EditAttrs = array();

		// Extended
		$CCEStudentAssignments->Extended->CellCssStyle = ""; $CCEStudentAssignments->Extended->CellCssClass = "";
		$CCEStudentAssignments->Extended->CellAttrs = array(); $CCEStudentAssignments->Extended->ViewAttrs = array(); $CCEStudentAssignments->Extended->EditAttrs = array();

		// References
		$CCEStudentAssignments->References->CellCssStyle = ""; $CCEStudentAssignments->References->CellCssClass = "";
		$CCEStudentAssignments->References->CellAttrs = array(); $CCEStudentAssignments->References->ViewAttrs = array(); $CCEStudentAssignments->References->EditAttrs = array();

		// TempR
		$CCEStudentAssignments->TempR->CellCssStyle = ""; $CCEStudentAssignments->TempR->CellCssClass = "";
		$CCEStudentAssignments->TempR->CellAttrs = array(); $CCEStudentAssignments->TempR->ViewAttrs = array(); $CCEStudentAssignments->TempR->EditAttrs = array();

		// ResubmitDateOverride
		$CCEStudentAssignments->ResubmitDateOverride->CellCssStyle = ""; $CCEStudentAssignments->ResubmitDateOverride->CellCssClass = "";
		$CCEStudentAssignments->ResubmitDateOverride->CellAttrs = array(); $CCEStudentAssignments->ResubmitDateOverride->ViewAttrs = array(); $CCEStudentAssignments->ResubmitDateOverride->EditAttrs = array();
		if ($CCEStudentAssignments->RowType == EW_ROWTYPE_VIEW) { // View row

			// CCEStudentAssigID
			$CCEStudentAssignments->CCEStudentAssigID->ViewValue = $CCEStudentAssignments->CCEStudentAssigID->CurrentValue;
			$CCEStudentAssignments->CCEStudentAssigID->CssStyle = "";
			$CCEStudentAssignments->CCEStudentAssigID->CssClass = "";
			$CCEStudentAssignments->CCEStudentAssigID->ViewCustomAttributes = "";

			// CCEStudentID
			if (strval($CCEStudentAssignments->CCEStudentID->CurrentValue) <> "") {
				$sFilterWrk = "`CCEStudentID` = " . ew_AdjustSql($CCEStudentAssignments->CCEStudentID->CurrentValue) . "";
			$sSqlWrk = "SELECT `FirstName`, `Surname` FROM `CCEStudents`";
			$sWhereWrk = "";
			if ($sFilterWrk <> "") {
				if ($sWhereWrk <> "") $sWhereWrk .= " AND ";
				$sWhereWrk .= "(" . $sFilterWrk . ")";
			}
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$sSqlWrk .= " ORDER BY `Surname` Asc";
				$rswrk = $conn->Execute($sSqlWrk);
				if ($rswrk && !$rswrk->EOF) { // Lookup values found
					$CCEStudentAssignments->CCEStudentID->ViewValue = $rswrk->fields('FirstName');
					$CCEStudentAssignments->CCEStudentID->ViewValue .= ew_ValueSeparator(0) . $rswrk->fields('Surname');
					$rswrk->Close();
				} else {
					$CCEStudentAssignments->CCEStudentID->ViewValue = $CCEStudentAssignments->CCEStudentID->CurrentValue;
				}
			} else {
				$CCEStudentAssignments->CCEStudentID->ViewValue = NULL;
			}
			$CCEStudentAssignments->CCEStudentID->CssStyle = "";
			$CCEStudentAssignments->CCEStudentID->CssClass = "";
			$CCEStudentAssignments->CCEStudentID->ViewCustomAttributes = "";

			// CCEAssignmentID
			if (strval($CCEStudentAssignments->CCEAssignmentID->CurrentValue) <> "") {
				$sFilterWrk = "`CCEAssignmentID` = " . ew_AdjustSql($CCEStudentAssignments->CCEAssignmentID->CurrentValue) . "";
			$sSqlWrk = "SELECT `RefNum`, `AssignmentName` FROM `CCEAssignments`";
			$sWhereWrk = "";
			if ($sFilterWrk <> "") {
				if ($sWhereWrk <> "") $sWhereWrk .= " AND ";
				$sWhereWrk .= "(" . $sFilterWrk . ")";
			}
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$sSqlWrk .= " ORDER BY `DueDate` Desc";
				$rswrk = $conn->Execute($sSqlWrk);
				if ($rswrk && !$rswrk->EOF) { // Lookup values found
					$CCEStudentAssignments->CCEAssignmentID->ViewValue = $rswrk->fields('RefNum');
					$CCEStudentAssignments->CCEAssignmentID->ViewValue .= ew_ValueSeparator(0) . $rswrk->fields('AssignmentName');
					$rswrk->Close();
				} else {
					$CCEStudentAssignments->CCEAssignmentID->ViewValue = $CCEStudentAssignments->CCEAssignmentID->CurrentValue;
				}
			} else {
				$CCEStudentAssignments->CCEAssignmentID->ViewValue = NULL;
			}
			$CCEStudentAssignments->CCEAssignmentID->CssStyle = "";
			$CCEStudentAssignments->CCEAssignmentID->CssClass = "";
			$CCEStudentAssignments->CCEAssignmentID->ViewCustomAttributes = "";

			// AssignmentFile1
			if (!ew_Empty($CCEStudentAssignments->AssignmentFile1->Upload->DbValue)) {
				$CCEStudentAssignments->AssignmentFile1->ViewValue = $CCEStudentAssignments->AssignmentFile1->Upload->DbValue;
			} else {
				$CCEStudentAssignments->AssignmentFile1->ViewValue = "";
			}
			$CCEStudentAssignments->AssignmentFile1->CssStyle = "";
			$CCEStudentAssignments->AssignmentFile1->CssClass = "";
			$CCEStudentAssignments->AssignmentFile1->ViewCustomAttributes = "";

			// AssignmentFile2
			if (!ew_Empty($CCEStudentAssignments->AssignmentFile2->Upload->DbValue)) {
				$CCEStudentAssignments->AssignmentFile2->ViewValue = $CCEStudentAssignments->AssignmentFile2->Upload->DbValue;
			} else {
				$CCEStudentAssignments->AssignmentFile2->ViewValue = "";
			}
			$CCEStudentAssignments->AssignmentFile2->CssStyle = "";
			$CCEStudentAssignments->AssignmentFile2->CssClass = "";
			$CCEStudentAssignments->AssignmentFile2->ViewCustomAttributes = "";

			// AssignmentFile3
			if (!ew_Empty($CCEStudentAssignments->AssignmentFile3->Upload->DbValue)) {
				$CCEStudentAssignments->AssignmentFile3->ViewValue = $CCEStudentAssignments->AssignmentFile3->Upload->DbValue;
			} else {
				$CCEStudentAssignments->AssignmentFile3->ViewValue = "";
			}
			$CCEStudentAssignments->AssignmentFile3->CssStyle = "";
			$CCEStudentAssignments->AssignmentFile3->CssClass = "";
			$CCEStudentAssignments->AssignmentFile3->ViewCustomAttributes = "";

			// AssignmentFile4
			if (!ew_Empty($CCEStudentAssignments->AssignmentFile4->Upload->DbValue)) {
				$CCEStudentAssignments->AssignmentFile4->ViewValue = $CCEStudentAssignments->AssignmentFile4->Upload->DbValue;
			} else {
				$CCEStudentAssignments->AssignmentFile4->ViewValue = "";
			}
			$CCEStudentAssignments->AssignmentFile4->CssStyle = "";
			$CCEStudentAssignments->AssignmentFile4->CssClass = "";
			$CCEStudentAssignments->AssignmentFile4->ViewCustomAttributes = "";

			// AssignmentFile5
			if (!ew_Empty($CCEStudentAssignments->AssignmentFile5->Upload->DbValue)) {
				$CCEStudentAssignments->AssignmentFile5->ViewValue = $CCEStudentAssignments->AssignmentFile5->Upload->DbValue;
			} else {
				$CCEStudentAssignments->AssignmentFile5->ViewValue = "";
			}
			$CCEStudentAssignments->AssignmentFile5->CssStyle = "";
			$CCEStudentAssignments->AssignmentFile5->CssClass = "";
			$CCEStudentAssignments->AssignmentFile5->ViewCustomAttributes = "";

			// Comments
			$CCEStudentAssignments->Comments->ViewValue = $CCEStudentAssignments->Comments->CurrentValue;
			$CCEStudentAssignments->Comments->CssStyle = "";
			$CCEStudentAssignments->Comments->CssClass = "";
			$CCEStudentAssignments->Comments->ViewCustomAttributes = "";

			// DateSubmitted
			$CCEStudentAssignments->DateSubmitted->ViewValue = $CCEStudentAssignments->DateSubmitted->CurrentValue;
			$CCEStudentAssignments->DateSubmitted->ViewValue = ew_FormatDateTime($CCEStudentAssignments->DateSubmitted->ViewValue, 9);
			$CCEStudentAssignments->DateSubmitted->CssStyle = "";
			$CCEStudentAssignments->DateSubmitted->CssClass = "";
			$CCEStudentAssignments->DateSubmitted->ViewCustomAttributes = "";

			// Completed
			if (strval($CCEStudentAssignments->Completed->CurrentValue) <> "") {
				switch ($CCEStudentAssignments->Completed->CurrentValue) {
					case "1":
						$CCEStudentAssignments->Completed->ViewValue = "Yes";
						break;
					case "0":
						$CCEStudentAssignments->Completed->ViewValue = "No";
						break;
					default:
						$CCEStudentAssignments->Completed->ViewValue = $CCEStudentAssignments->Completed->CurrentValue;
				}
			} else {
				$CCEStudentAssignments->Completed->ViewValue = NULL;
			}
			$CCEStudentAssignments->Completed->CssStyle = "";
			$CCEStudentAssignments->Completed->CssClass = "";
			$CCEStudentAssignments->Completed->ViewCustomAttributes = "";

			// Passed
			if (strval($CCEStudentAssignments->Passed->CurrentValue) <> "") {
				switch ($CCEStudentAssignments->Passed->CurrentValue) {
					case "1":
						$CCEStudentAssignments->Passed->ViewValue = "Achieved";
						break;
					case "2":
						$CCEStudentAssignments->Passed->ViewValue = "Not Yet Achieved";
						break;
					case "0":
						$CCEStudentAssignments->Passed->ViewValue = "Not Yet Evaluated";
						break;
					case "3":
						$CCEStudentAssignments->Passed->ViewValue = "Added to PoE";
						break;
					default:
						$CCEStudentAssignments->Passed->ViewValue = $CCEStudentAssignments->Passed->CurrentValue;
				}
			} else {
				$CCEStudentAssignments->Passed->ViewValue = NULL;
			}
			$CCEStudentAssignments->Passed->CssStyle = "";
			$CCEStudentAssignments->Passed->CssClass = "";
			$CCEStudentAssignments->Passed->ViewCustomAttributes = "";

			// RulingCode
			if (strval($CCEStudentAssignments->RulingCode->CurrentValue) <> "") {
				$sFilterWrk = "`RulingCode` = '" . ew_AdjustSql($CCEStudentAssignments->RulingCode->CurrentValue) . "'";
			$sSqlWrk = "SELECT `Ruling` FROM `CCERulingCodes`";
			$sWhereWrk = "";
			if ($sFilterWrk <> "") {
				if ($sWhereWrk <> "") $sWhereWrk .= " AND ";
				$sWhereWrk .= "(" . $sFilterWrk . ")";
			}
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
				$rswrk = $conn->Execute($sSqlWrk);
				if ($rswrk && !$rswrk->EOF) { // Lookup values found
					$CCEStudentAssignments->RulingCode->ViewValue = $rswrk->fields('Ruling');
					$rswrk->Close();
				} else {
					$CCEStudentAssignments->RulingCode->ViewValue = $CCEStudentAssignments->RulingCode->CurrentValue;
				}
			} else {
				$CCEStudentAssignments->RulingCode->ViewValue = NULL;
			}
			$CCEStudentAssignments->RulingCode->CssStyle = "";
			$CCEStudentAssignments->RulingCode->CssClass = "";
			$CCEStudentAssignments->RulingCode->ViewCustomAttributes = "";

			// AssignmentScore
			$CCEStudentAssignments->AssignmentScore->ViewValue = $CCEStudentAssignments->AssignmentScore->CurrentValue;
			$CCEStudentAssignments->AssignmentScore->CssStyle = "";
			$CCEStudentAssignments->AssignmentScore->CssClass = "";
			$CCEStudentAssignments->AssignmentScore->ViewCustomAttributes = "";

			// ScoredBy
			if (strval($CCEStudentAssignments->ScoredBy->CurrentValue) <> "") {
				$sFilterWrk = "`CCEFacilitatorUserID` = " . ew_AdjustSql($CCEStudentAssignments->ScoredBy->CurrentValue) . "";
			$sSqlWrk = "SELECT `FullName` FROM `CCEFacilitatorUsers`";
			$sWhereWrk = "";
			if ($sFilterWrk <> "") {
				if ($sWhereWrk <> "") $sWhereWrk .= " AND ";
				$sWhereWrk .= "(" . $sFilterWrk . ")";
			}
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
			$sSqlWrk .= " ORDER BY `FullName`";
				$rswrk = $conn->Execute($sSqlWrk);
				if ($rswrk && !$rswrk->EOF) { // Lookup values found
					$CCEStudentAssignments->ScoredBy->ViewValue = $rswrk->fields('FullName');
					$rswrk->Close();
				} else {
					$CCEStudentAssignments->ScoredBy->ViewValue = $CCEStudentAssignments->ScoredBy->CurrentValue;
				}
			} else {
				$CCEStudentAssignments->ScoredBy->ViewValue = NULL;
			}
			$CCEStudentAssignments->ScoredBy->CssStyle = "";
			$CCEStudentAssignments->ScoredBy->CssClass = "";
			$CCEStudentAssignments->ScoredBy->ViewCustomAttributes = "";

			// Remarks
			$CCEStudentAssignments->Remarks->ViewValue = $CCEStudentAssignments->Remarks->CurrentValue;
			$CCEStudentAssignments->Remarks->CssStyle = "";
			$CCEStudentAssignments->Remarks->CssClass = "";
			$CCEStudentAssignments->Remarks->ViewCustomAttributes = "";

			// LastFeedback
			$CCEStudentAssignments->LastFeedback->ViewValue = $CCEStudentAssignments->LastFeedback->CurrentValue;
			$CCEStudentAssignments->LastFeedback->CssStyle = "";
			$CCEStudentAssignments->LastFeedback->CssClass = "";
			$CCEStudentAssignments->LastFeedback->ViewCustomAttributes = "";

			// MsgAttachment
			if (!ew_Empty($CCEStudentAssignments->MsgAttachment->Upload->DbValue)) {
				$CCEStudentAssignments->MsgAttachment->ViewValue = $CCEStudentAssignments->MsgAttachment->Upload->DbValue;
			} else {
				$CCEStudentAssignments->MsgAttachment->ViewValue = "";
			}
			$CCEStudentAssignments->MsgAttachment->CssStyle = "";
			$CCEStudentAssignments->MsgAttachment->CssClass = "";
			$CCEStudentAssignments->MsgAttachment->ViewCustomAttributes = "";

			// Extended
			if (strval($CCEStudentAssignments->Extended->CurrentValue) <> "") {
				switch ($CCEStudentAssignments->Extended->CurrentValue) {
					case "1":
						$CCEStudentAssignments->Extended->ViewValue = "Yes";
						break;
					case "0":
						$CCEStudentAssignments->Extended->ViewValue = "No";
						break;
					default:
						$CCEStudentAssignments->Extended->ViewValue = $CCEStudentAssignments->Extended->CurrentValue;
				}
			} else {
				$CCEStudentAssignments->Extended->ViewValue = NULL;
			}
			$CCEStudentAssignments->Extended->CssStyle = "";
			$CCEStudentAssignments->Extended->CssClass = "";
			$CCEStudentAssignments->Extended->ViewCustomAttributes = "";

			// References
			$CCEStudentAssignments->References->ViewValue = $CCEStudentAssignments->References->CurrentValue;
			$CCEStudentAssignments->References->CssStyle = "";
			$CCEStudentAssignments->References->CssClass = "";
			$CCEStudentAssignments->References->ViewCustomAttributes = "";

			// TempR
			$CCEStudentAssignments->TempR->ViewValue = $CCEStudentAssignments->TempR->CurrentValue;
			$CCEStudentAssignments->TempR->CssStyle = "";
			$CCEStudentAssignments->TempR->CssClass = "";
			$CCEStudentAssignments->TempR->ViewCustomAttributes = "";

			// ResubmitDateOverride
			$CCEStudentAssignments->ResubmitDateOverride->ViewValue = $CCEStudentAssignments->ResubmitDateOverride->CurrentValue;
			$CCEStudentAssignments->ResubmitDateOverride->ViewValue = ew_FormatDateTime($CCEStudentAssignments->ResubmitDateOverride->ViewValue, 5);
			$CCEStudentAssignments->ResubmitDateOverride->CssStyle = "";
			$CCEStudentAssignments->ResubmitDateOverride->CssClass = "";
			$CCEStudentAssignments->ResubmitDateOverride->ViewCustomAttributes = "";

			// CCEStudentID
			$CCEStudentAssignments->CCEStudentID->HrefValue = "";
			$CCEStudentAssignments->CCEStudentID->TooltipValue = "";

			// CCEAssignmentID
			$CCEStudentAssignments->CCEAssignmentID->HrefValue = "";
			$CCEStudentAssignments->CCEAssignmentID->TooltipValue = "";

			// AssignmentFile1
			if (!ew_Empty($CCEStudentAssignments->AssignmentFile1->Upload->DbValue)) {
				$CCEStudentAssignments->AssignmentFile1->HrefValue = ew_UploadPathEx(FALSE, $CCEStudentAssignments->AssignmentFile1->UploadPath) . ((!empty($CCEStudentAssignments->AssignmentFile1->ViewValue)) ? $CCEStudentAssignments->AssignmentFile1->ViewValue : $CCEStudentAssignments->AssignmentFile1->CurrentValue);
				if ($CCEStudentAssignments->Export <> "") $CCEStudentAssignments->AssignmentFile1->HrefValue = ew_ConvertFullUrl($CCEStudentAssignments->AssignmentFile1->HrefValue);
			} else {
				$CCEStudentAssignments->AssignmentFile1->HrefValue = "";
			}
			$CCEStudentAssignments->AssignmentFile1->TooltipValue = "";

			// AssignmentFile2
			if (!ew_Empty($CCEStudentAssignments->AssignmentFile2->Upload->DbValue)) {
				$CCEStudentAssignments->AssignmentFile2->HrefValue = ew_UploadPathEx(FALSE, $CCEStudentAssignments->AssignmentFile2->UploadPath) . ((!empty($CCEStudentAssignments->AssignmentFile2->ViewValue)) ? $CCEStudentAssignments->AssignmentFile2->ViewValue : $CCEStudentAssignments->AssignmentFile2->CurrentValue);
				if ($CCEStudentAssignments->Export <> "") $CCEStudentAssignments->AssignmentFile2->HrefValue = ew_ConvertFullUrl($CCEStudentAssignments->AssignmentFile2->HrefValue);
			} else {
				$CCEStudentAssignments->AssignmentFile2->HrefValue = "";
			}
			$CCEStudentAssignments->AssignmentFile2->TooltipValue = "";

			// AssignmentFile3
			if (!ew_Empty($CCEStudentAssignments->AssignmentFile3->Upload->DbValue)) {
				$CCEStudentAssignments->AssignmentFile3->HrefValue = ew_UploadPathEx(FALSE, $CCEStudentAssignments->AssignmentFile3->UploadPath) . ((!empty($CCEStudentAssignments->AssignmentFile3->ViewValue)) ? $CCEStudentAssignments->AssignmentFile3->ViewValue : $CCEStudentAssignments->AssignmentFile3->CurrentValue);
				if ($CCEStudentAssignments->Export <> "") $CCEStudentAssignments->AssignmentFile3->HrefValue = ew_ConvertFullUrl($CCEStudentAssignments->AssignmentFile3->HrefValue);
			} else {
				$CCEStudentAssignments->AssignmentFile3->HrefValue = "";
			}
			$CCEStudentAssignments->AssignmentFile3->TooltipValue = "";

			// AssignmentFile4
			if (!ew_Empty($CCEStudentAssignments->AssignmentFile4->Upload->DbValue)) {
				$CCEStudentAssignments->AssignmentFile4->HrefValue = ew_UploadPathEx(FALSE, $CCEStudentAssignments->AssignmentFile4->UploadPath) . ((!empty($CCEStudentAssignments->AssignmentFile4->ViewValue)) ? $CCEStudentAssignments->AssignmentFile4->ViewValue : $CCEStudentAssignments->AssignmentFile4->CurrentValue);
				if ($CCEStudentAssignments->Export <> "") $CCEStudentAssignments->AssignmentFile4->HrefValue = ew_ConvertFullUrl($CCEStudentAssignments->AssignmentFile4->HrefValue);
			} else {
				$CCEStudentAssignments->AssignmentFile4->HrefValue = "";
			}
			$CCEStudentAssignments->AssignmentFile4->TooltipValue = "";

			// AssignmentFile5
			if (!ew_Empty($CCEStudentAssignments->AssignmentFile5->Upload->DbValue)) {
				$CCEStudentAssignments->AssignmentFile5->HrefValue = ew_UploadPathEx(FALSE, $CCEStudentAssignments->AssignmentFile5->UploadPath) . ((!empty($CCEStudentAssignments->AssignmentFile5->ViewValue)) ? $CCEStudentAssignments->AssignmentFile5->ViewValue : $CCEStudentAssignments->AssignmentFile5->CurrentValue);
				if ($CCEStudentAssignments->Export <> "") $CCEStudentAssignments->AssignmentFile5->HrefValue = ew_ConvertFullUrl($CCEStudentAssignments->AssignmentFile5->HrefValue);
			} else {
				$CCEStudentAssignments->AssignmentFile5->HrefValue = "";
			}
			$CCEStudentAssignments->AssignmentFile5->TooltipValue = "";

			// Comments
			$CCEStudentAssignments->Comments->HrefValue = "";
			$CCEStudentAssignments->Comments->TooltipValue = "";

			// DateSubmitted
			$CCEStudentAssignments->DateSubmitted->HrefValue = "";
			$CCEStudentAssignments->DateSubmitted->TooltipValue = "";

			// Passed
			$CCEStudentAssignments->Passed->HrefValue = "";
			$CCEStudentAssignments->Passed->TooltipValue = "";

			// RulingCode
			$CCEStudentAssignments->RulingCode->HrefValue = "";
			$CCEStudentAssignments->RulingCode->TooltipValue = "";

			// AssignmentScore
			$CCEStudentAssignments->AssignmentScore->HrefValue = "";
			$CCEStudentAssignments->AssignmentScore->TooltipValue = "";

			// ScoredBy
			$CCEStudentAssignments->ScoredBy->HrefValue = "";
			$CCEStudentAssignments->ScoredBy->TooltipValue = "";

			// Remarks
			$CCEStudentAssignments->Remarks->HrefValue = "";
			$CCEStudentAssignments->Remarks->TooltipValue = "";

			// LastFeedback
			$CCEStudentAssignments->LastFeedback->HrefValue = "";
			$CCEStudentAssignments->LastFeedback->TooltipValue = "";

			// MsgAttachment
			if (!ew_Empty($CCEStudentAssignments->MsgAttachment->Upload->DbValue)) {
				$CCEStudentAssignments->MsgAttachment->HrefValue = ew_UploadPathEx(FALSE, $CCEStudentAssignments->MsgAttachment->UploadPath) . ((!empty($CCEStudentAssignments->MsgAttachment->ViewValue)) ? $CCEStudentAssignments->MsgAttachment->ViewValue : $CCEStudentAssignments->MsgAttachment->CurrentValue);
				if ($CCEStudentAssignments->Export <> "") $CCEStudentAssignments->MsgAttachment->HrefValue = ew_ConvertFullUrl($CCEStudentAssignments->MsgAttachment->HrefValue);
			} else {
				$CCEStudentAssignments->MsgAttachment->HrefValue = "";
			}
			$CCEStudentAssignments->MsgAttachment->TooltipValue = "";

			// Extended
			$CCEStudentAssignments->Extended->HrefValue = "";
			$CCEStudentAssignments->Extended->TooltipValue = "";

			// References
			$CCEStudentAssignments->References->HrefValue = "";
			$CCEStudentAssignments->References->TooltipValue = "";

			// TempR
			$CCEStudentAssignments->TempR->HrefValue = "";
			$CCEStudentAssignments->TempR->TooltipValue = "";

			// ResubmitDateOverride
			$CCEStudentAssignments->ResubmitDateOverride->HrefValue = "";
			$CCEStudentAssignments->ResubmitDateOverride->TooltipValue = "";
		}

		// Call Row Rendered event
		if ($CCEStudentAssignments->RowType <> EW_ROWTYPE_AGGREGATEINIT)
			$CCEStudentAssignments->Row_Rendered();
	}

	// Export data in HTML/CSV/Word/Excel/XML/Email format
	function ExportData() {
		global $CCEStudentAssignments;
		$utf8 = FALSE;
		$bSelectLimit = FALSE;

		// Load recordset
		if ($bSelectLimit) {
			$this->lTotalRecs = $CCEStudentAssignments->SelectRecordCount();
		} else {
			if ($rs = $this->LoadRecordset())
				$this->lTotalRecs = $rs->RecordCount();
		}
		$this->lStartRec = 1;
		$this->SetUpStartRec(); // Set up start record position

		// Set the last record to display
		if ($this->lDisplayRecs < 0) {
			$this->lStopRec = $this->lTotalRecs;
		} else {
			$this->lStopRec = $this->lStartRec + $this->lDisplayRecs - 1;
		}
		if (!$rs) {
			header("Content-Type:"); // Remove header
			header("Content-Disposition:");
			$this->ShowMessage();
			return;
		}
		if ($CCEStudentAssignments->Export == "xml") {
			$XmlDoc = new cXMLDocument(EW_XML_ENCODING);
			$XmlDoc->AddRoot();
		} else {
			$ExportDoc = new cExportDocument($CCEStudentAssignments, "v");
			$ExportDoc->ExportHeader();
			if ($ExportDoc->Horizontal) { // Horizontal format, write header
				$ExportDoc->BeginExportRow();
				$ExportDoc->ExportCaption($CCEStudentAssignments->CCEStudentAssigID);
				$ExportDoc->ExportCaption($CCEStudentAssignments->CCEStudentID);
				$ExportDoc->ExportCaption($CCEStudentAssignments->CCEAssignmentID);
				$ExportDoc->ExportCaption($CCEStudentAssignments->AssignmentFile1);
				$ExportDoc->ExportCaption($CCEStudentAssignments->AssignmentFile2);
				$ExportDoc->ExportCaption($CCEStudentAssignments->AssignmentFile3);
				$ExportDoc->ExportCaption($CCEStudentAssignments->AssignmentFile4);
				$ExportDoc->ExportCaption($CCEStudentAssignments->AssignmentFile5);
				$ExportDoc->ExportCaption($CCEStudentAssignments->DateSubmitted);
				$ExportDoc->ExportCaption($CCEStudentAssignments->Completed);
				$ExportDoc->ExportCaption($CCEStudentAssignments->Passed);
				$ExportDoc->ExportCaption($CCEStudentAssignments->RulingCode);
				$ExportDoc->ExportCaption($CCEStudentAssignments->AssignmentScore);
				$ExportDoc->ExportCaption($CCEStudentAssignments->ScoredBy);
				$ExportDoc->ExportCaption($CCEStudentAssignments->MsgAttachment);
				$ExportDoc->ExportCaption($CCEStudentAssignments->Extended);
				$ExportDoc->ExportCaption($CCEStudentAssignments->ResubmitDateOverride);
				$ExportDoc->EndExportRow();
			}
		}

		// Move to first record
		$this->lRecCnt = $this->lStartRec - 1;
		if (!$rs->EOF) {
			$rs->MoveFirst();
			if (!$bSelectLimit && $this->lStartRec > 1)
				$rs->Move($this->lStartRec - 1);
		}
		while (!$rs->EOF && $this->lRecCnt < $this->lStopRec) {
			$this->lRecCnt++;
			if (intval($this->lRecCnt) >= intval($this->lStartRec)) {
				$this->LoadRowValues($rs);

				// Render row
				$CCEStudentAssignments->CssClass = "";
				$CCEStudentAssignments->CssStyle = "";
				$CCEStudentAssignments->RowType = EW_ROWTYPE_VIEW; // Render view
				$this->RenderRow();
				if ($CCEStudentAssignments->Export == "xml") {
					$XmlDoc->AddRow();
					$XmlDoc->AddField('CCEStudentAssigID', $CCEStudentAssignments->CCEStudentAssigID->ExportValue($CCEStudentAssignments->Export, $CCEStudentAssignments->ExportOriginalValue));
					$XmlDoc->AddField('CCEStudentID', $CCEStudentAssignments->CCEStudentID->ExportValue($CCEStudentAssignments->Export, $CCEStudentAssignments->ExportOriginalValue));
					$XmlDoc->AddField('CCEAssignmentID', $CCEStudentAssignments->CCEAssignmentID->ExportValue($CCEStudentAssignments->Export, $CCEStudentAssignments->ExportOriginalValue));
					$XmlDoc->AddField('AssignmentFile1', $CCEStudentAssignments->AssignmentFile1->ExportValue($CCEStudentAssignments->Export, $CCEStudentAssignments->ExportOriginalValue));
					$XmlDoc->AddField('AssignmentFile2', $CCEStudentAssignments->AssignmentFile2->ExportValue($CCEStudentAssignments->Export, $CCEStudentAssignments->ExportOriginalValue));
					$XmlDoc->AddField('AssignmentFile3', $CCEStudentAssignments->AssignmentFile3->ExportValue($CCEStudentAssignments->Export, $CCEStudentAssignments->ExportOriginalValue));
					$XmlDoc->AddField('AssignmentFile4', $CCEStudentAssignments->AssignmentFile4->ExportValue($CCEStudentAssignments->Export, $CCEStudentAssignments->ExportOriginalValue));
					$XmlDoc->AddField('AssignmentFile5', $CCEStudentAssignments->AssignmentFile5->ExportValue($CCEStudentAssignments->Export, $CCEStudentAssignments->ExportOriginalValue));
					$XmlDoc->AddField('DateSubmitted', $CCEStudentAssignments->DateSubmitted->ExportValue($CCEStudentAssignments->Export, $CCEStudentAssignments->ExportOriginalValue));
					$XmlDoc->AddField('Completed', $CCEStudentAssignments->Completed->ExportValue($CCEStudentAssignments->Export, $CCEStudentAssignments->ExportOriginalValue));
					$XmlDoc->AddField('Passed', $CCEStudentAssignments->Passed->ExportValue($CCEStudentAssignments->Export, $CCEStudentAssignments->ExportOriginalValue));
					$XmlDoc->AddField('RulingCode', $CCEStudentAssignments->RulingCode->ExportValue($CCEStudentAssignments->Export, $CCEStudentAssignments->ExportOriginalValue));
					$XmlDoc->AddField('AssignmentScore', $CCEStudentAssignments->AssignmentScore->ExportValue($CCEStudentAssignments->Export, $CCEStudentAssignments->ExportOriginalValue));
					$XmlDoc->AddField('ScoredBy', $CCEStudentAssignments->ScoredBy->ExportValue($CCEStudentAssignments->Export, $CCEStudentAssignments->ExportOriginalValue));
					$XmlDoc->AddField('MsgAttachment', $CCEStudentAssignments->MsgAttachment->ExportValue($CCEStudentAssignments->Export, $CCEStudentAssignments->ExportOriginalValue));
					$XmlDoc->AddField('Extended', $CCEStudentAssignments->Extended->ExportValue($CCEStudentAssignments->Export, $CCEStudentAssignments->ExportOriginalValue));
					$XmlDoc->AddField('ResubmitDateOverride', $CCEStudentAssignments->ResubmitDateOverride->ExportValue($CCEStudentAssignments->Export, $CCEStudentAssignments->ExportOriginalValue));
				} else {
					$ExportDoc->BeginExportRow(TRUE); // Allow CSS styles if enabled
					$ExportDoc->ExportField($CCEStudentAssignments->CCEStudentAssigID);
					$ExportDoc->ExportField($CCEStudentAssignments->CCEStudentID);
					$ExportDoc->ExportField($CCEStudentAssignments->CCEAssignmentID);
					$ExportDoc->ExportField($CCEStudentAssignments->AssignmentFile1);
					$ExportDoc->ExportField($CCEStudentAssignments->AssignmentFile2);
					$ExportDoc->ExportField($CCEStudentAssignments->AssignmentFile3);
					$ExportDoc->ExportField($CCEStudentAssignments->AssignmentFile4);
					$ExportDoc->ExportField($CCEStudentAssignments->AssignmentFile5);
					$ExportDoc->ExportField($CCEStudentAssignments->DateSubmitted);
					$ExportDoc->ExportField($CCEStudentAssignments->Completed);
					$ExportDoc->ExportField($CCEStudentAssignments->Passed);
					$ExportDoc->ExportField($CCEStudentAssignments->RulingCode);
					$ExportDoc->ExportField($CCEStudentAssignments->AssignmentScore);
					$ExportDoc->ExportField($CCEStudentAssignments->ScoredBy);
					$ExportDoc->ExportField($CCEStudentAssignments->MsgAttachment);
					$ExportDoc->ExportField($CCEStudentAssignments->Extended);
					$ExportDoc->ExportField($CCEStudentAssignments->ResubmitDateOverride);
					$ExportDoc->EndExportRow();
				}
			}
			$rs->MoveNext();
		}
		if ($CCEStudentAssignments->Export <> "xml")
			$ExportDoc->ExportFooter();

		// Close recordset
		$rs->Close();

		// Clean output buffer
		if (!EW_DEBUG_ENABLED && ob_get_length())
			ob_end_clean();

		// Write BOM if utf-8
		if ($utf8 && !in_array($CCEStudentAssignments->Export, array("email", "xml")))
			echo "\xEF\xBB\xBF";

		// Write debug message if enabled
		if (EW_DEBUG_ENABLED)
			echo ew_DebugMsg();

		// Output data
		if ($CCEStudentAssignments->Export == "xml") {
			header("Content-Type: text/xml");
			echo $XmlDoc->XML();
		} elseif ($CCEStudentAssignments->Export == "email") {
			$this->ExportEmail($ExportDoc->Text);
			$this->Page_Terminate($CCEStudentAssignments->ExportReturnUrl());
		} else {
			echo $ExportDoc->Text;
		}
	}

	// Export email
	function ExportEmail($EmailContent) {
		global $Language, $CCEStudentAssignments;
		$sSender = @$_GET["sender"];
		$sRecipient = @$_GET["recipient"];
		$sCc = @$_GET["cc"];
		$sBcc = @$_GET["bcc"];
		$sContentType = @$_GET["contenttype"];

		// Subject
		$sSubject = ew_StripSlashes(@$_GET["subject"]);
		$sEmailSubject = $sSubject;

		// Message
		$sContent = ew_StripSlashes(@$_GET["message"]);
		$sEmailMessage = $sContent;

		// Check sender
		if ($sSender == "") {
			$this->setMessage($Language->Phrase("EnterSenderEmail"));
			return;
		}
		if (!ew_CheckEmail($sSender)) {
			$this->setMessage($Language->Phrase("EnterProperSenderEmail"));
			return;
		}

		// Check recipient
		if (!ew_CheckEmailList($sRecipient, EW_MAX_EMAIL_RECIPIENT)) {
			$this->setMessage($Language->Phrase("EnterProperRecipientEmail"));
			return;
		}

		// Check cc
		if (!ew_CheckEmailList($sCc, EW_MAX_EMAIL_RECIPIENT)) {
			$this->setMessage($Language->Phrase("EnterProperCcEmail"));
			return;
		}

		// Check bcc
		if (!ew_CheckEmailList($sBcc, EW_MAX_EMAIL_RECIPIENT)) {
			$this->setMessage($Language->Phrase("EnterProperBccEmail"));
			return;
		}

		// Check email sent count
		if (!isset($_SESSION[EW_EXPORT_EMAIL_COUNTER]))
			$_SESSION[EW_EXPORT_EMAIL_COUNTER] = 0;
		if (intval($_SESSION[EW_EXPORT_EMAIL_COUNTER]) > EW_MAX_EMAIL_SENT_COUNT) {
			$this->setMessage($Language->Phrase("ExceedMaxEmailExport"));
			return;
		}
		if ($sEmailMessage <> "") {
			$sEmailMessage = ew_RemoveXSS($sEmailMessage);
			$sEmailMessage .= ($sContentType == "url") ? "\r\n\r\n" : "<br><br>";
		}
		if ($sContentType == "url") {
			$sUrl = ew_ConvertFullUrl(ew_CurrentPage() . "?" . $this->ExportQueryString());
			$sEmailMessage .= $sUrl; // send URL only
		} else {
			$sEmailMessage .= $EmailContent; // send HTML
		}

		// Send email
		$Email = new cEmail();
		$Email->Sender = $sSender; // Sender
		$Email->Recipient = $sRecipient; // Recipient
		$Email->Cc = $sCc; // Cc
		$Email->Bcc = $sBcc; // Bcc
		$Email->Subject = $sEmailSubject; // Subject
		$Email->Content = $sEmailMessage; // Content
		$Email->Format = ($sContentType == "url") ? "text" : "html";
		$Email->Charset = EW_EMAIL_CHARSET;
		$EventArgs = array();
		$bEmailSent = FALSE;
		if ($CCEStudentAssignments->Email_Sending($Email, $EventArgs))
			$bEmailSent = $Email->Send();

		// Check email sent status
		if ($bEmailSent) {

			// Update email sent count
			$_SESSION[EW_EXPORT_EMAIL_COUNTER]++;

			// Sent email success
			$this->setMessage($Language->Phrase("SendEmailSuccess"));
		} else {

			// Sent email failure
			$this->setMessage($Email->SendErrDescription);
		}
	}

	// Export QueryString
	function ExportQueryString() {
		global $CCEStudentAssignments;

		// Initialize
		$sQry = "export=html";

		// Add record key QueryString
		$sQry .= "&" . substr($CCEStudentAssignments->KeyUrl("", ""), 1);
		return $sQry;
	}

	// Page Load event
	function Page_Load() {

		//echo "Page Load";
	}

	// Page Unload event
	function Page_Unload() {

		//echo "Page Unload";
	}

	// Page Redirecting event
	function Page_Redirecting(&$url) {

		// Example:
		//$url = "your URL";

	}

	// Message Showing event
	function Message_Showing(&$msg) {

		// Example:
		//$msg = "your new message";

	}
}
?>