| Current Path : /var/www/cesa.co.za/cceadmin/ |
| Current File : /var/www/cesa.co.za/cceadmin/CCEStudentAssignmentsadd.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 "CCEStudentsinfo.php" ?>
<?php include "CCEUsersinfo.php" ?>
<?php include "cstArchivedStudents2016info.php" ?>
<?php include "cstArchivedStudents2017info.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_add = new cCCEStudentAssignments_add();
$Page =& $CCEStudentAssignments_add;
// Page init
$CCEStudentAssignments_add->Page_Init();
// Page main
$CCEStudentAssignments_add->Page_Main();
?>
<?php include "header.php" ?>
<script type="text/javascript">
<!--
// Create page object
var CCEStudentAssignments_add = new ew_Page("CCEStudentAssignments_add");
// page properties
CCEStudentAssignments_add.PageID = "add"; // page ID
CCEStudentAssignments_add.FormID = "fCCEStudentAssignmentsadd"; // form ID
var EW_PAGE_ID = CCEStudentAssignments_add.PageID; // for backward compatibility
// extend page with ValidateForm function
CCEStudentAssignments_add.ValidateForm = function(fobj) {
ew_PostAutoSuggest(fobj);
if (!this.ValidateRequired)
return true; // ignore validation
if (fobj.a_confirm && fobj.a_confirm.value == "F")
return true;
var i, elm, aelm, infix;
var rowcnt = (fobj.key_count) ? Number(fobj.key_count.value) : 1;
for (i=0; i<rowcnt; i++) {
infix = (fobj.key_count) ? String(i+1) : "";
elm = fobj.elements["x" + infix + "_AssignmentFile1"];
if (elm && !ew_CheckFileType(elm.value))
return ew_OnError(this, elm, ewLanguage.Phrase("WrongFileType"));
elm = fobj.elements["x" + infix + "_AssignmentFile2"];
if (elm && !ew_CheckFileType(elm.value))
return ew_OnError(this, elm, ewLanguage.Phrase("WrongFileType"));
elm = fobj.elements["x" + infix + "_AssignmentFile3"];
if (elm && !ew_CheckFileType(elm.value))
return ew_OnError(this, elm, ewLanguage.Phrase("WrongFileType"));
elm = fobj.elements["x" + infix + "_AssignmentFile4"];
if (elm && !ew_CheckFileType(elm.value))
return ew_OnError(this, elm, ewLanguage.Phrase("WrongFileType"));
elm = fobj.elements["x" + infix + "_AssignmentFile5"];
if (elm && !ew_CheckFileType(elm.value))
return ew_OnError(this, elm, ewLanguage.Phrase("WrongFileType"));
elm = fobj.elements["x" + infix + "_DateSubmitted"];
if (elm && !ew_CheckDate(elm.value))
return ew_OnError(this, elm, "<?php echo ew_JsEncode2($CCEStudentAssignments->DateSubmitted->FldErrMsg()) ?>");
elm = fobj.elements["x" + infix + "_AssignmentScore"];
if (elm && !ew_CheckNumber(elm.value))
return ew_OnError(this, elm, "<?php echo ew_JsEncode2($CCEStudentAssignments->AssignmentScore->FldErrMsg()) ?>");
elm = fobj.elements["x" + infix + "_MsgAttachment"];
if (elm && !ew_CheckFileType(elm.value))
return ew_OnError(this, elm, ewLanguage.Phrase("WrongFileType"));
// Call Form Custom Validate event
if (!this.Form_CustomValidate(fobj)) return false;
}
return true;
}
// extend page with Form_CustomValidate function
CCEStudentAssignments_add.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_add.ValidateRequired = true; // uses JavaScript validation
<?php } else { ?>
CCEStudentAssignments_add.ValidateRequired = false; // no JavaScript validation
<?php } ?>
//-->
</script>
<script type="text/javascript">
<!--
var ew_DHTMLEditors = [];
//-->
</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>
<p><span class="phpmaker"><?php echo $Language->Phrase("Add") ?> <?php echo $Language->Phrase("TblTypeTABLE") ?><?php echo $CCEStudentAssignments->TableCaption() ?><br><br>
<a href="<?php echo $CCEStudentAssignments->getReturnUrl() ?>"><?php echo $Language->Phrase("GoBack") ?></a></span></p>
<?php
if (EW_DEBUG_ENABLED)
echo ew_DebugMsg();
$CCEStudentAssignments_add->ShowMessage();
?>
<form name="fCCEStudentAssignmentsadd" id="fCCEStudentAssignmentsadd" action="<?php echo ew_CurrentPage() ?>" method="post" enctype="multipart/form-data" onsubmit="return CCEStudentAssignments_add.ValidateForm(this);">
<p>
<input type="hidden" name="t" id="t" value="CCEStudentAssignments">
<input type="hidden" name="a_add" id="a_add" value="A">
<table cellspacing="0" class="ewGrid"><tr><td class="ewGridContent">
<div class="ewGridMiddlePanel">
<table cellspacing="0" class="ewTable">
<?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() ?>><span id="el_CCEAssignmentID">
<?php if ($CCEStudentAssignments->CCEAssignmentID->getSessionValue() <> "") { ?>
<div<?php echo $CCEStudentAssignments->CCEAssignmentID->ViewAttributes() ?>><?php echo $CCEStudentAssignments->CCEAssignmentID->ViewValue ?></div>
<input type="hidden" id="x_CCEAssignmentID" name="x_CCEAssignmentID" value="<?php echo ew_HtmlEncode($CCEStudentAssignments->CCEAssignmentID->CurrentValue) ?>">
<?php } else { ?>
<select id="x_CCEAssignmentID" name="x_CCEAssignmentID" title="<?php echo $CCEStudentAssignments->CCEAssignmentID->FldTitle() ?>"<?php echo $CCEStudentAssignments->CCEAssignmentID->EditAttributes() ?>>
<?php
if (is_array($CCEStudentAssignments->CCEAssignmentID->EditValue)) {
$arwrk = $CCEStudentAssignments->CCEAssignmentID->EditValue;
$rowswrk = count($arwrk);
$emptywrk = TRUE;
for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
$selwrk = (strval($CCEStudentAssignments->CCEAssignmentID->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " selected=\"selected\"" : "";
if ($selwrk <> "") $emptywrk = FALSE;
?>
<option value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?>>
<?php echo $arwrk[$rowcntwrk][1] ?>
<?php if ($arwrk[$rowcntwrk][2] <> "") { ?>
<?php echo ew_ValueSeparator($rowcntwrk) ?><?php echo $arwrk[$rowcntwrk][2] ?>
<?php } ?>
</option>
<?php
}
}
?>
</select>
<?php } ?>
</span><?php echo $CCEStudentAssignments->CCEAssignmentID->CustomMsg ?></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() ?>><span id="el_AssignmentFile1">
<input type="file" name="x_AssignmentFile1" id="x_AssignmentFile1" title="<?php echo $CCEStudentAssignments->AssignmentFile1->FldTitle() ?>" size="30"<?php echo $CCEStudentAssignments->AssignmentFile1->EditAttributes() ?>>
</div>
</span><?php echo $CCEStudentAssignments->AssignmentFile1->CustomMsg ?></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() ?>><span id="el_AssignmentFile2">
<input type="file" name="x_AssignmentFile2" id="x_AssignmentFile2" title="<?php echo $CCEStudentAssignments->AssignmentFile2->FldTitle() ?>" size="30"<?php echo $CCEStudentAssignments->AssignmentFile2->EditAttributes() ?>>
</div>
</span><?php echo $CCEStudentAssignments->AssignmentFile2->CustomMsg ?></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() ?>><span id="el_AssignmentFile3">
<input type="file" name="x_AssignmentFile3" id="x_AssignmentFile3" title="<?php echo $CCEStudentAssignments->AssignmentFile3->FldTitle() ?>" size="30"<?php echo $CCEStudentAssignments->AssignmentFile3->EditAttributes() ?>>
</div>
</span><?php echo $CCEStudentAssignments->AssignmentFile3->CustomMsg ?></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() ?>><span id="el_AssignmentFile4">
<input type="file" name="x_AssignmentFile4" id="x_AssignmentFile4" title="<?php echo $CCEStudentAssignments->AssignmentFile4->FldTitle() ?>" size="30"<?php echo $CCEStudentAssignments->AssignmentFile4->EditAttributes() ?>>
</div>
</span><?php echo $CCEStudentAssignments->AssignmentFile4->CustomMsg ?></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() ?>><span id="el_AssignmentFile5">
<input type="file" name="x_AssignmentFile5" id="x_AssignmentFile5" title="<?php echo $CCEStudentAssignments->AssignmentFile5->FldTitle() ?>" size="30"<?php echo $CCEStudentAssignments->AssignmentFile5->EditAttributes() ?>>
</div>
</span><?php echo $CCEStudentAssignments->AssignmentFile5->CustomMsg ?></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() ?>><span id="el_Comments">
<textarea name="x_Comments" id="x_Comments" title="<?php echo $CCEStudentAssignments->Comments->FldTitle() ?>" cols="35" rows="4"<?php echo $CCEStudentAssignments->Comments->EditAttributes() ?>><?php echo $CCEStudentAssignments->Comments->EditValue ?></textarea>
</span><?php echo $CCEStudentAssignments->Comments->CustomMsg ?></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() ?>><span id="el_DateSubmitted">
<input type="text" name="x_DateSubmitted" id="x_DateSubmitted" title="<?php echo $CCEStudentAssignments->DateSubmitted->FldTitle() ?>" value="<?php echo $CCEStudentAssignments->DateSubmitted->EditValue ?>"<?php echo $CCEStudentAssignments->DateSubmitted->EditAttributes() ?>>
</span><?php echo $CCEStudentAssignments->DateSubmitted->CustomMsg ?></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() ?>><span id="el_Passed">
<div id="tp_x_Passed" class="<?php echo EW_ITEM_TEMPLATE_CLASSNAME ?>"><label><input type="radio" name="x_Passed" id="x_Passed" title="<?php echo $CCEStudentAssignments->Passed->FldTitle() ?>" value="{value}"<?php echo $CCEStudentAssignments->Passed->EditAttributes() ?>></label></div>
<div id="dsl_x_Passed" repeatcolumn="5">
<?php
$arwrk = $CCEStudentAssignments->Passed->EditValue;
if (is_array($arwrk)) {
$rowswrk = count($arwrk);
$emptywrk = TRUE;
for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
$selwrk = (strval($CCEStudentAssignments->Passed->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " checked=\"checked\"" : "";
if ($selwrk <> "") $emptywrk = FALSE;
// Note: No spacing within the LABEL tag
?>
<?php echo ew_RepeatColumnTable($rowswrk, $rowcntwrk, 5, 1) ?>
<label><input type="radio" name="x_Passed" id="x_Passed" title="<?php echo $CCEStudentAssignments->Passed->FldTitle() ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $CCEStudentAssignments->Passed->EditAttributes() ?>><?php echo $arwrk[$rowcntwrk][1] ?></label>
<?php echo ew_RepeatColumnTable($rowswrk, $rowcntwrk, 5, 2) ?>
<?php
}
}
?>
</div>
</span><?php echo $CCEStudentAssignments->Passed->CustomMsg ?></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() ?>><span id="el_RulingCode">
<div id="tp_x_RulingCode" class="<?php echo EW_ITEM_TEMPLATE_CLASSNAME ?>"><label><input type="radio" name="x_RulingCode" id="x_RulingCode" title="<?php echo $CCEStudentAssignments->RulingCode->FldTitle() ?>" value="{value}"<?php echo $CCEStudentAssignments->RulingCode->EditAttributes() ?>></label></div>
<div id="dsl_x_RulingCode" repeatcolumn="5">
<?php
$arwrk = $CCEStudentAssignments->RulingCode->EditValue;
if (is_array($arwrk)) {
$rowswrk = count($arwrk);
$emptywrk = TRUE;
for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
$selwrk = (strval($CCEStudentAssignments->RulingCode->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " checked=\"checked\"" : "";
if ($selwrk <> "") $emptywrk = FALSE;
// Note: No spacing within the LABEL tag
?>
<?php echo ew_RepeatColumnTable($rowswrk, $rowcntwrk, 5, 1) ?>
<label><input type="radio" name="x_RulingCode" id="x_RulingCode" title="<?php echo $CCEStudentAssignments->RulingCode->FldTitle() ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $CCEStudentAssignments->RulingCode->EditAttributes() ?>><?php echo $arwrk[$rowcntwrk][1] ?></label>
<?php echo ew_RepeatColumnTable($rowswrk, $rowcntwrk, 5, 2) ?>
<?php
}
}
?>
</div>
</span><?php echo $CCEStudentAssignments->RulingCode->CustomMsg ?></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() ?>><span id="el_AssignmentScore">
<input type="text" name="x_AssignmentScore" id="x_AssignmentScore" title="<?php echo $CCEStudentAssignments->AssignmentScore->FldTitle() ?>" size="30" value="<?php echo $CCEStudentAssignments->AssignmentScore->EditValue ?>"<?php echo $CCEStudentAssignments->AssignmentScore->EditAttributes() ?>>
</span><?php echo $CCEStudentAssignments->AssignmentScore->CustomMsg ?></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() ?>><span id="el_ScoredBy">
<select id="x_ScoredBy" name="x_ScoredBy" title="<?php echo $CCEStudentAssignments->ScoredBy->FldTitle() ?>"<?php echo $CCEStudentAssignments->ScoredBy->EditAttributes() ?>>
<?php
if (is_array($CCEStudentAssignments->ScoredBy->EditValue)) {
$arwrk = $CCEStudentAssignments->ScoredBy->EditValue;
$rowswrk = count($arwrk);
$emptywrk = TRUE;
for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
$selwrk = (strval($CCEStudentAssignments->ScoredBy->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " selected=\"selected\"" : "";
if ($selwrk <> "") $emptywrk = FALSE;
?>
<option value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?>>
<?php echo $arwrk[$rowcntwrk][1] ?>
</option>
<?php
}
}
?>
</select>
</span><?php echo $CCEStudentAssignments->ScoredBy->CustomMsg ?></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() ?>><span id="el_Remarks">
<textarea name="x_Remarks" id="x_Remarks" title="<?php echo $CCEStudentAssignments->Remarks->FldTitle() ?>" cols="35" rows="4"<?php echo $CCEStudentAssignments->Remarks->EditAttributes() ?>><?php echo $CCEStudentAssignments->Remarks->EditValue ?></textarea>
</span><?php echo $CCEStudentAssignments->Remarks->CustomMsg ?></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() ?>><span id="el_MsgAttachment">
<input type="file" name="x_MsgAttachment" id="x_MsgAttachment" title="<?php echo $CCEStudentAssignments->MsgAttachment->FldTitle() ?>" size="30"<?php echo $CCEStudentAssignments->MsgAttachment->EditAttributes() ?>>
</div>
</span><?php echo $CCEStudentAssignments->MsgAttachment->CustomMsg ?></td>
</tr>
<?php } ?>
<?php if ($CCEStudentAssignments->Extended->Visible) { // Extended ?>
<tr<?php echo $CCEStudentAssignments->RowAttributes() ?>>
<td class="ewTableHeader"><?php echo $CCEStudentAssignments->Extended->FldCaption() ?><?php echo $Language->Phrase("FieldRequiredIndicator") ?></td>
<td<?php echo $CCEStudentAssignments->Extended->CellAttributes() ?>><span id="el_Extended">
<div id="tp_x_Extended" class="<?php echo EW_ITEM_TEMPLATE_CLASSNAME ?>"><label><input type="radio" name="x_Extended" id="x_Extended" title="<?php echo $CCEStudentAssignments->Extended->FldTitle() ?>" value="{value}"<?php echo $CCEStudentAssignments->Extended->EditAttributes() ?>></label></div>
<div id="dsl_x_Extended" repeatcolumn="5">
<?php
$arwrk = $CCEStudentAssignments->Extended->EditValue;
if (is_array($arwrk)) {
$rowswrk = count($arwrk);
$emptywrk = TRUE;
for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
$selwrk = (strval($CCEStudentAssignments->Extended->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " checked=\"checked\"" : "";
if ($selwrk <> "") $emptywrk = FALSE;
// Note: No spacing within the LABEL tag
?>
<?php echo ew_RepeatColumnTable($rowswrk, $rowcntwrk, 5, 1) ?>
<label><input type="radio" name="x_Extended" id="x_Extended" title="<?php echo $CCEStudentAssignments->Extended->FldTitle() ?>" value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?><?php echo $CCEStudentAssignments->Extended->EditAttributes() ?>><?php echo $arwrk[$rowcntwrk][1] ?></label>
<?php echo ew_RepeatColumnTable($rowswrk, $rowcntwrk, 5, 2) ?>
<?php
}
}
?>
</div>
</span><?php echo $CCEStudentAssignments->Extended->CustomMsg ?></td>
</tr>
<?php } ?>
</table>
</div>
</td></tr></table>
<?php if (strval($CCEStudentAssignments->CCEStudentID->getSessionValue()) <> "") { ?>
<input type="hidden" name="x_CCEStudentID" id="x_CCEStudentID" value="<?php echo ew_HtmlEncode(strval($CCEStudentAssignments->CCEStudentID->getSessionValue())) ?>">
<?php } ?>
<p>
<input type="submit" name="btnAction" id="btnAction" value="<?php echo ew_BtnCaption($Language->Phrase("AddBtn")) ?>">
</form>
<script language="JavaScript" type="text/javascript">
<!--
// Write your table-specific startup script here
// document.write("page loaded");
//-->
</script>
<?php include "footer.php" ?>
<?php
$CCEStudentAssignments_add->Page_Terminate();
?>
<?php
//
// Page class
//
class cCCEStudentAssignments_add {
// Page ID
var $PageID = 'add';
// Table name
var $TableName = 'CCEStudentAssignments';
// Page object name
var $PageObjName = 'CCEStudentAssignments_add';
// 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 (CCEStudents)
$GLOBALS['CCEStudents'] = new cCCEStudents();
// Table object (CCEUsers)
$GLOBALS['CCEUsers'] = new cCCEUsers();
// Table object (cstArchivedStudents2016)
$GLOBALS['cstArchivedStudents2016'] = new ccstArchivedStudents2016();
// Table object (cstArchivedStudents2017)
$GLOBALS['cstArchivedStudents2017'] = new ccstArchivedStudents2017();
// Page ID
if (!defined("EW_PAGE_ID"))
define("EW_PAGE_ID", 'add', 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");
}
$Security->TablePermission_Loading();
$Security->LoadCurrentUserLevel($this->TableName);
$Security->TablePermission_Loaded();
if (!$Security->IsLoggedIn()) {
$Security->SaveLastUrl();
$this->Page_Terminate("login.php");
}
if (!$Security->CanAdd()) {
$Security->SaveLastUrl();
$this->Page_Terminate("CCEStudentAssignmentslist.php");
}
// Create form object
$objForm = new cFormObj();
// 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 $sDbMasterFilter = "";
var $sDbDetailFilter = "";
var $lPriv = 0;
//
// Page main
//
function Page_Main() {
global $objForm, $Language, $gsFormError, $CCEStudentAssignments;
// Load key values from QueryString
$bCopy = TRUE;
if (@$_GET["CCEStudentAssigID"] != "") {
$CCEStudentAssignments->CCEStudentAssigID->setQueryStringValue($_GET["CCEStudentAssigID"]);
} else {
$bCopy = FALSE;
}
// Set up master/detail parameters
$this->SetUpMasterDetail();
// Process form if post back
if (@$_POST["a_add"] <> "") {
$CCEStudentAssignments->CurrentAction = $_POST["a_add"]; // Get form action
$this->GetUploadFiles(); // Get upload files
$this->LoadFormValues(); // Load form values
// Validate form
if (!$this->ValidateForm()) {
$CCEStudentAssignments->CurrentAction = "I"; // Form error, reset action
$this->setMessage($gsFormError);
}
} else { // Not post back
if ($bCopy) {
$CCEStudentAssignments->CurrentAction = "C"; // Copy record
} else {
$CCEStudentAssignments->CurrentAction = "I"; // Display blank record
$this->LoadDefaultValues(); // Load default values
}
}
// Perform action based on action code
switch ($CCEStudentAssignments->CurrentAction) {
case "I": // Blank record, no action required
break;
case "C": // Copy an existing record
if (!$this->LoadRow()) { // Load record based on key
$this->setMessage($Language->Phrase("NoRecord")); // No record found
$this->Page_Terminate("CCEStudentAssignmentslist.php"); // No matching record, return to list
}
break;
case "A": // ' Add new record
$CCEStudentAssignments->SendEmail = TRUE; // Send email on add success
if ($this->AddRow()) { // Add successful
$this->setMessage($Language->Phrase("AddSuccess")); // Set up success message
$sReturnUrl = $CCEStudentAssignments->getReturnUrl();
if (ew_GetPageName($sReturnUrl) == "CCEStudentAssignmentsview.php")
$sReturnUrl = $CCEStudentAssignments->ViewUrl(); // View paging, return to view page with keyurl directly
$this->Page_Terminate($sReturnUrl); // Clean up and return
} else {
$this->RestoreFormValues(); // Add failed, restore form values
}
}
// Render row based on row type
$CCEStudentAssignments->RowType = EW_ROWTYPE_ADD; // Render add type
// Render row
$this->RenderRow();
}
// Get upload files
function GetUploadFiles() {
global $objForm, $CCEStudentAssignments;
// Get upload data
if ($CCEStudentAssignments->AssignmentFile1->Upload->UploadFile()) {
// No action required
} else {
echo $CCEStudentAssignments->AssignmentFile1->Upload->Message;
$this->Page_Terminate();
exit();
}
if ($CCEStudentAssignments->AssignmentFile2->Upload->UploadFile()) {
// No action required
} else {
echo $CCEStudentAssignments->AssignmentFile2->Upload->Message;
$this->Page_Terminate();
exit();
}
if ($CCEStudentAssignments->AssignmentFile3->Upload->UploadFile()) {
// No action required
} else {
echo $CCEStudentAssignments->AssignmentFile3->Upload->Message;
$this->Page_Terminate();
exit();
}
if ($CCEStudentAssignments->AssignmentFile4->Upload->UploadFile()) {
// No action required
} else {
echo $CCEStudentAssignments->AssignmentFile4->Upload->Message;
$this->Page_Terminate();
exit();
}
if ($CCEStudentAssignments->AssignmentFile5->Upload->UploadFile()) {
// No action required
} else {
echo $CCEStudentAssignments->AssignmentFile5->Upload->Message;
$this->Page_Terminate();
exit();
}
if ($CCEStudentAssignments->MsgAttachment->Upload->UploadFile()) {
// No action required
} else {
echo $CCEStudentAssignments->MsgAttachment->Upload->Message;
$this->Page_Terminate();
exit();
}
}
// Load default values
function LoadDefaultValues() {
global $CCEStudentAssignments;
$CCEStudentAssignments->AssignmentFile1->CurrentValue = NULL; // Clear file related field
$CCEStudentAssignments->AssignmentFile2->CurrentValue = NULL; // Clear file related field
$CCEStudentAssignments->AssignmentFile3->CurrentValue = NULL; // Clear file related field
$CCEStudentAssignments->AssignmentFile4->CurrentValue = NULL; // Clear file related field
$CCEStudentAssignments->AssignmentFile5->CurrentValue = NULL; // Clear file related field
$CCEStudentAssignments->Passed->CurrentValue = 0;
$CCEStudentAssignments->MsgAttachment->CurrentValue = NULL; // Clear file related field
$CCEStudentAssignments->Extended->CurrentValue = 0;
}
// Load form values
function LoadFormValues() {
// Load from form
global $objForm, $CCEStudentAssignments;
$CCEStudentAssignments->CCEAssignmentID->setFormValue($objForm->GetValue("x_CCEAssignmentID"));
$CCEStudentAssignments->Comments->setFormValue($objForm->GetValue("x_Comments"));
$CCEStudentAssignments->DateSubmitted->setFormValue($objForm->GetValue("x_DateSubmitted"));
$CCEStudentAssignments->DateSubmitted->CurrentValue = ew_UnFormatDateTime($CCEStudentAssignments->DateSubmitted->CurrentValue, 5);
$CCEStudentAssignments->Passed->setFormValue($objForm->GetValue("x_Passed"));
$CCEStudentAssignments->RulingCode->setFormValue($objForm->GetValue("x_RulingCode"));
$CCEStudentAssignments->AssignmentScore->setFormValue($objForm->GetValue("x_AssignmentScore"));
$CCEStudentAssignments->ScoredBy->setFormValue($objForm->GetValue("x_ScoredBy"));
$CCEStudentAssignments->Remarks->setFormValue($objForm->GetValue("x_Remarks"));
$CCEStudentAssignments->Extended->setFormValue($objForm->GetValue("x_Extended"));
$CCEStudentAssignments->CCEStudentAssigID->setFormValue($objForm->GetValue("x_CCEStudentAssigID"));
}
// Restore form values
function RestoreFormValues() {
global $objForm, $CCEStudentAssignments;
$CCEStudentAssignments->CCEStudentAssigID->CurrentValue = $CCEStudentAssignments->CCEStudentAssigID->FormValue;
$CCEStudentAssignments->CCEAssignmentID->CurrentValue = $CCEStudentAssignments->CCEAssignmentID->FormValue;
$CCEStudentAssignments->Comments->CurrentValue = $CCEStudentAssignments->Comments->FormValue;
$CCEStudentAssignments->DateSubmitted->CurrentValue = $CCEStudentAssignments->DateSubmitted->FormValue;
$CCEStudentAssignments->DateSubmitted->CurrentValue = ew_UnFormatDateTime($CCEStudentAssignments->DateSubmitted->CurrentValue, 5);
$CCEStudentAssignments->Passed->CurrentValue = $CCEStudentAssignments->Passed->FormValue;
$CCEStudentAssignments->RulingCode->CurrentValue = $CCEStudentAssignments->RulingCode->FormValue;
$CCEStudentAssignments->AssignmentScore->CurrentValue = $CCEStudentAssignments->AssignmentScore->FormValue;
$CCEStudentAssignments->ScoredBy->CurrentValue = $CCEStudentAssignments->ScoredBy->FormValue;
$CCEStudentAssignments->Remarks->CurrentValue = $CCEStudentAssignments->Remarks->FormValue;
$CCEStudentAssignments->Extended->CurrentValue = $CCEStudentAssignments->Extended->FormValue;
}
// 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'));
}
// Render row values based on field settings
function RenderRow() {
global $conn, $Security, $Language, $CCEStudentAssignments;
// Initialize URLs
// Call Row_Rendering event
$CCEStudentAssignments->Row_Rendering();
// Common render codes for all row types
// 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();
// 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();
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`";
$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 ($sWhereWrk <> "") $sWhereWrk .= " AND ";
$sWhereWrk .= "(" . "Archived=0" . ")";
if ($sFilterWrk <> "") {
if ($sWhereWrk <> "") $sWhereWrk .= " AND ";
$sWhereWrk .= "(" . $sFilterWrk . ")";
}
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
$sSqlWrk .= " ORDER BY `RefNum`";
$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, 5);
$CCEStudentAssignments->DateSubmitted->CssStyle = "";
$CCEStudentAssignments->DateSubmitted->CssClass = "";
$CCEStudentAssignments->DateSubmitted->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 = "`FacilitatorID` = " . ew_AdjustSql($CCEStudentAssignments->ScoredBy->CurrentValue) . "";
$sSqlWrk = "SELECT `FacilitatorName` FROM `CCEFacilitators`";
$sWhereWrk = "";
if ($sFilterWrk <> "") {
if ($sWhereWrk <> "") $sWhereWrk .= " AND ";
$sWhereWrk .= "(" . $sFilterWrk . ")";
}
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
$sSqlWrk .= " ORDER BY `FacilitatorName`";
$rswrk = $conn->Execute($sSqlWrk);
if ($rswrk && !$rswrk->EOF) { // Lookup values found
$CCEStudentAssignments->ScoredBy->ViewValue = $rswrk->fields('FacilitatorName');
$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 = "";
// 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 = "";
// 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 = "";
// 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 = "";
} elseif ($CCEStudentAssignments->RowType == EW_ROWTYPE_ADD) { // Add row
// CCEAssignmentID
$CCEStudentAssignments->CCEAssignmentID->EditCustomAttributes = "";
if ($CCEStudentAssignments->CCEAssignmentID->getSessionValue() <> "") {
$CCEStudentAssignments->CCEAssignmentID->CurrentValue = $CCEStudentAssignments->CCEAssignmentID->getSessionValue();
if (strval($CCEStudentAssignments->CCEAssignmentID->CurrentValue) <> "") {
$sFilterWrk = "`CCEAssignmentID` = " . ew_AdjustSql($CCEStudentAssignments->CCEAssignmentID->CurrentValue) . "";
$sSqlWrk = "SELECT `RefNum`, `AssignmentName` FROM `CCEAssignments`";
$sWhereWrk = "";
if ($sWhereWrk <> "") $sWhereWrk .= " AND ";
$sWhereWrk .= "(" . "Archived=0" . ")";
if ($sFilterWrk <> "") {
if ($sWhereWrk <> "") $sWhereWrk .= " AND ";
$sWhereWrk .= "(" . $sFilterWrk . ")";
}
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
$sSqlWrk .= " ORDER BY `RefNum`";
$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 = "";
} else {
$sFilterWrk = "";
$sSqlWrk = "SELECT `CCEAssignmentID`, `RefNum`, `AssignmentName`, '' AS SelectFilterFld FROM `CCEAssignments`";
$sWhereWrk = "";
if ($sWhereWrk <> "") $sWhereWrk .= " AND ";
$sWhereWrk .= "(" . "Archived=0" . ")";
if ($sFilterWrk <> "") {
if ($sWhereWrk <> "") $sWhereWrk .= " AND ";
$sWhereWrk .= "(" . $sFilterWrk . ")";
}
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
$sSqlWrk .= " ORDER BY `RefNum`";
$rswrk = $conn->Execute($sSqlWrk);
$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
if ($rswrk) $rswrk->Close();
array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), ""));
$CCEStudentAssignments->CCEAssignmentID->EditValue = $arwrk;
}
// AssignmentFile1
$CCEStudentAssignments->AssignmentFile1->EditCustomAttributes = "";
if (!ew_Empty($CCEStudentAssignments->AssignmentFile1->Upload->DbValue)) {
$CCEStudentAssignments->AssignmentFile1->EditValue = $CCEStudentAssignments->AssignmentFile1->Upload->DbValue;
} else {
$CCEStudentAssignments->AssignmentFile1->EditValue = "";
}
// AssignmentFile2
$CCEStudentAssignments->AssignmentFile2->EditCustomAttributes = "";
if (!ew_Empty($CCEStudentAssignments->AssignmentFile2->Upload->DbValue)) {
$CCEStudentAssignments->AssignmentFile2->EditValue = $CCEStudentAssignments->AssignmentFile2->Upload->DbValue;
} else {
$CCEStudentAssignments->AssignmentFile2->EditValue = "";
}
// AssignmentFile3
$CCEStudentAssignments->AssignmentFile3->EditCustomAttributes = "";
if (!ew_Empty($CCEStudentAssignments->AssignmentFile3->Upload->DbValue)) {
$CCEStudentAssignments->AssignmentFile3->EditValue = $CCEStudentAssignments->AssignmentFile3->Upload->DbValue;
} else {
$CCEStudentAssignments->AssignmentFile3->EditValue = "";
}
// AssignmentFile4
$CCEStudentAssignments->AssignmentFile4->EditCustomAttributes = "";
if (!ew_Empty($CCEStudentAssignments->AssignmentFile4->Upload->DbValue)) {
$CCEStudentAssignments->AssignmentFile4->EditValue = $CCEStudentAssignments->AssignmentFile4->Upload->DbValue;
} else {
$CCEStudentAssignments->AssignmentFile4->EditValue = "";
}
// AssignmentFile5
$CCEStudentAssignments->AssignmentFile5->EditCustomAttributes = "";
if (!ew_Empty($CCEStudentAssignments->AssignmentFile5->Upload->DbValue)) {
$CCEStudentAssignments->AssignmentFile5->EditValue = $CCEStudentAssignments->AssignmentFile5->Upload->DbValue;
} else {
$CCEStudentAssignments->AssignmentFile5->EditValue = "";
}
// Comments
$CCEStudentAssignments->Comments->EditCustomAttributes = "";
$CCEStudentAssignments->Comments->EditValue = ew_HtmlEncode($CCEStudentAssignments->Comments->CurrentValue);
// DateSubmitted
$CCEStudentAssignments->DateSubmitted->EditCustomAttributes = "";
$CCEStudentAssignments->DateSubmitted->EditValue = ew_HtmlEncode(ew_FormatDateTime($CCEStudentAssignments->DateSubmitted->CurrentValue, 5));
// Passed
$CCEStudentAssignments->Passed->EditCustomAttributes = "";
$arwrk = array();
$arwrk[] = array("1", "Achieved");
$arwrk[] = array("2", "Not Yet Achieved");
$arwrk[] = array("0", "Not Yet Evaluated");
$arwrk[] = array("3", "Added to PoE");
$CCEStudentAssignments->Passed->EditValue = $arwrk;
// RulingCode
$CCEStudentAssignments->RulingCode->EditCustomAttributes = "";
$sFilterWrk = "";
$sSqlWrk = "SELECT `RulingCode`, `Ruling`, '' AS Disp2Fld, '' AS SelectFilterFld FROM `CCERulingCodes`";
$sWhereWrk = "";
if ($sFilterWrk <> "") {
if ($sWhereWrk <> "") $sWhereWrk .= " AND ";
$sWhereWrk .= "(" . $sFilterWrk . ")";
}
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
$rswrk = $conn->Execute($sSqlWrk);
$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
if ($rswrk) $rswrk->Close();
$CCEStudentAssignments->RulingCode->EditValue = $arwrk;
// AssignmentScore
$CCEStudentAssignments->AssignmentScore->EditCustomAttributes = "";
$CCEStudentAssignments->AssignmentScore->EditValue = ew_HtmlEncode($CCEStudentAssignments->AssignmentScore->CurrentValue);
// ScoredBy
$CCEStudentAssignments->ScoredBy->EditCustomAttributes = "";
$sFilterWrk = "";
$sSqlWrk = "SELECT `FacilitatorID`, `FacilitatorName`, '' AS Disp2Fld, '' AS SelectFilterFld FROM `CCEFacilitators`";
$sWhereWrk = "";
if ($sFilterWrk <> "") {
if ($sWhereWrk <> "") $sWhereWrk .= " AND ";
$sWhereWrk .= "(" . $sFilterWrk . ")";
}
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
$sSqlWrk .= " ORDER BY `FacilitatorName`";
$rswrk = $conn->Execute($sSqlWrk);
$arwrk = ($rswrk) ? $rswrk->GetRows() : array();
if ($rswrk) $rswrk->Close();
array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect")));
$CCEStudentAssignments->ScoredBy->EditValue = $arwrk;
// Remarks
$CCEStudentAssignments->Remarks->EditCustomAttributes = "";
$CCEStudentAssignments->Remarks->EditValue = ew_HtmlEncode($CCEStudentAssignments->Remarks->CurrentValue);
// MsgAttachment
$CCEStudentAssignments->MsgAttachment->EditCustomAttributes = "";
if (!ew_Empty($CCEStudentAssignments->MsgAttachment->Upload->DbValue)) {
$CCEStudentAssignments->MsgAttachment->EditValue = $CCEStudentAssignments->MsgAttachment->Upload->DbValue;
} else {
$CCEStudentAssignments->MsgAttachment->EditValue = "";
}
// Extended
$CCEStudentAssignments->Extended->EditCustomAttributes = "";
$arwrk = array();
$arwrk[] = array("1", "Yes");
$arwrk[] = array("0", "No");
$CCEStudentAssignments->Extended->EditValue = $arwrk;
}
// Call Row Rendered event
if ($CCEStudentAssignments->RowType <> EW_ROWTYPE_AGGREGATEINIT)
$CCEStudentAssignments->Row_Rendered();
}
// Validate form
function ValidateForm() {
global $Language, $gsFormError, $CCEStudentAssignments;
// Initialize form error message
$gsFormError = "";
if (!ew_CheckFileType($CCEStudentAssignments->AssignmentFile1->Upload->FileName)) {
$gsFormError .= ($gsFormError <> "") ? "<br>" : "";
$gsFormError .= $Language->Phrase("WrongFileType");
}
if ($CCEStudentAssignments->AssignmentFile1->Upload->FileSize > 0 && EW_MAX_FILE_SIZE > 0 && $CCEStudentAssignments->AssignmentFile1->Upload->FileSize > EW_MAX_FILE_SIZE) {
$gsFormError .= ($gsFormError <> "") ? "<br>" : "";
$gsFormError .= str_replace("%s", EW_MAX_FILE_SIZE, $Language->Phrase("MaxFileSize"));
}
if (in_array($CCEStudentAssignments->AssignmentFile1->Upload->Error, array(1, 2, 3, 6, 7, 8))) {
$gsFormError .= ($gsFormError <> "") ? "<br>" : "";
$gsFormError .= $Language->Phrase("PhpUploadErr" . $CCEStudentAssignments->AssignmentFile1->Upload->Error);
}
if (!ew_CheckFileType($CCEStudentAssignments->AssignmentFile2->Upload->FileName)) {
$gsFormError .= ($gsFormError <> "") ? "<br>" : "";
$gsFormError .= $Language->Phrase("WrongFileType");
}
if ($CCEStudentAssignments->AssignmentFile2->Upload->FileSize > 0 && EW_MAX_FILE_SIZE > 0 && $CCEStudentAssignments->AssignmentFile2->Upload->FileSize > EW_MAX_FILE_SIZE) {
$gsFormError .= ($gsFormError <> "") ? "<br>" : "";
$gsFormError .= str_replace("%s", EW_MAX_FILE_SIZE, $Language->Phrase("MaxFileSize"));
}
if (in_array($CCEStudentAssignments->AssignmentFile2->Upload->Error, array(1, 2, 3, 6, 7, 8))) {
$gsFormError .= ($gsFormError <> "") ? "<br>" : "";
$gsFormError .= $Language->Phrase("PhpUploadErr" . $CCEStudentAssignments->AssignmentFile2->Upload->Error);
}
if (!ew_CheckFileType($CCEStudentAssignments->AssignmentFile3->Upload->FileName)) {
$gsFormError .= ($gsFormError <> "") ? "<br>" : "";
$gsFormError .= $Language->Phrase("WrongFileType");
}
if ($CCEStudentAssignments->AssignmentFile3->Upload->FileSize > 0 && EW_MAX_FILE_SIZE > 0 && $CCEStudentAssignments->AssignmentFile3->Upload->FileSize > EW_MAX_FILE_SIZE) {
$gsFormError .= ($gsFormError <> "") ? "<br>" : "";
$gsFormError .= str_replace("%s", EW_MAX_FILE_SIZE, $Language->Phrase("MaxFileSize"));
}
if (in_array($CCEStudentAssignments->AssignmentFile3->Upload->Error, array(1, 2, 3, 6, 7, 8))) {
$gsFormError .= ($gsFormError <> "") ? "<br>" : "";
$gsFormError .= $Language->Phrase("PhpUploadErr" . $CCEStudentAssignments->AssignmentFile3->Upload->Error);
}
if (!ew_CheckFileType($CCEStudentAssignments->AssignmentFile4->Upload->FileName)) {
$gsFormError .= ($gsFormError <> "") ? "<br>" : "";
$gsFormError .= $Language->Phrase("WrongFileType");
}
if ($CCEStudentAssignments->AssignmentFile4->Upload->FileSize > 0 && EW_MAX_FILE_SIZE > 0 && $CCEStudentAssignments->AssignmentFile4->Upload->FileSize > EW_MAX_FILE_SIZE) {
$gsFormError .= ($gsFormError <> "") ? "<br>" : "";
$gsFormError .= str_replace("%s", EW_MAX_FILE_SIZE, $Language->Phrase("MaxFileSize"));
}
if (in_array($CCEStudentAssignments->AssignmentFile4->Upload->Error, array(1, 2, 3, 6, 7, 8))) {
$gsFormError .= ($gsFormError <> "") ? "<br>" : "";
$gsFormError .= $Language->Phrase("PhpUploadErr" . $CCEStudentAssignments->AssignmentFile4->Upload->Error);
}
if (!ew_CheckFileType($CCEStudentAssignments->AssignmentFile5->Upload->FileName)) {
$gsFormError .= ($gsFormError <> "") ? "<br>" : "";
$gsFormError .= $Language->Phrase("WrongFileType");
}
if ($CCEStudentAssignments->AssignmentFile5->Upload->FileSize > 0 && EW_MAX_FILE_SIZE > 0 && $CCEStudentAssignments->AssignmentFile5->Upload->FileSize > EW_MAX_FILE_SIZE) {
$gsFormError .= ($gsFormError <> "") ? "<br>" : "";
$gsFormError .= str_replace("%s", EW_MAX_FILE_SIZE, $Language->Phrase("MaxFileSize"));
}
if (in_array($CCEStudentAssignments->AssignmentFile5->Upload->Error, array(1, 2, 3, 6, 7, 8))) {
$gsFormError .= ($gsFormError <> "") ? "<br>" : "";
$gsFormError .= $Language->Phrase("PhpUploadErr" . $CCEStudentAssignments->AssignmentFile5->Upload->Error);
}
if (!ew_CheckFileType($CCEStudentAssignments->MsgAttachment->Upload->FileName)) {
$gsFormError .= ($gsFormError <> "") ? "<br>" : "";
$gsFormError .= $Language->Phrase("WrongFileType");
}
if ($CCEStudentAssignments->MsgAttachment->Upload->FileSize > 0 && EW_MAX_FILE_SIZE > 0 && $CCEStudentAssignments->MsgAttachment->Upload->FileSize > EW_MAX_FILE_SIZE) {
$gsFormError .= ($gsFormError <> "") ? "<br>" : "";
$gsFormError .= str_replace("%s", EW_MAX_FILE_SIZE, $Language->Phrase("MaxFileSize"));
}
if (in_array($CCEStudentAssignments->MsgAttachment->Upload->Error, array(1, 2, 3, 6, 7, 8))) {
$gsFormError .= ($gsFormError <> "") ? "<br>" : "";
$gsFormError .= $Language->Phrase("PhpUploadErr" . $CCEStudentAssignments->MsgAttachment->Upload->Error);
}
// Check if validation required
if (!EW_SERVER_VALIDATE)
return ($gsFormError == "");
if (!ew_CheckDate($CCEStudentAssignments->DateSubmitted->FormValue)) {
if ($gsFormError <> "") $gsFormError .= "<br>";
$gsFormError .= $CCEStudentAssignments->DateSubmitted->FldErrMsg();
}
if (!ew_CheckNumber($CCEStudentAssignments->AssignmentScore->FormValue)) {
if ($gsFormError <> "") $gsFormError .= "<br>";
$gsFormError .= $CCEStudentAssignments->AssignmentScore->FldErrMsg();
}
// Return validate result
$ValidateForm = ($gsFormError == "");
// Call Form_CustomValidate event
$sFormCustomError = "";
$ValidateForm = $ValidateForm && $this->Form_CustomValidate($sFormCustomError);
if ($sFormCustomError <> "") {
$gsFormError .= ($gsFormError <> "") ? "<br>" : "";
$gsFormError .= $sFormCustomError;
}
return $ValidateForm;
}
// Add record
function AddRow() {
global $conn, $Language, $Security, $CCEStudentAssignments;
$rsnew = array();
// CCEAssignmentID
$CCEStudentAssignments->CCEAssignmentID->SetDbValueDef($rsnew, $CCEStudentAssignments->CCEAssignmentID->CurrentValue, NULL, FALSE);
// AssignmentFile1
$CCEStudentAssignments->AssignmentFile1->Upload->SaveToSession(); // Save file value to Session
if (is_null($CCEStudentAssignments->AssignmentFile1->Upload->Value)) {
$rsnew['AssignmentFile1'] = NULL;
} else {
$rsnew['AssignmentFile1'] = ew_UploadFileNameEx(ew_UploadPathEx(TRUE, $CCEStudentAssignments->AssignmentFile1->UploadPath), $CCEStudentAssignments->AssignmentFile1->Upload->FileName);
}
// AssignmentFile2
$CCEStudentAssignments->AssignmentFile2->Upload->SaveToSession(); // Save file value to Session
if (is_null($CCEStudentAssignments->AssignmentFile2->Upload->Value)) {
$rsnew['AssignmentFile2'] = NULL;
} else {
$rsnew['AssignmentFile2'] = ew_UploadFileNameEx(ew_UploadPathEx(TRUE, $CCEStudentAssignments->AssignmentFile2->UploadPath), $CCEStudentAssignments->AssignmentFile2->Upload->FileName);
}
// AssignmentFile3
$CCEStudentAssignments->AssignmentFile3->Upload->SaveToSession(); // Save file value to Session
if (is_null($CCEStudentAssignments->AssignmentFile3->Upload->Value)) {
$rsnew['AssignmentFile3'] = NULL;
} else {
$rsnew['AssignmentFile3'] = ew_UploadFileNameEx(ew_UploadPathEx(TRUE, $CCEStudentAssignments->AssignmentFile3->UploadPath), $CCEStudentAssignments->AssignmentFile3->Upload->FileName);
}
// AssignmentFile4
$CCEStudentAssignments->AssignmentFile4->Upload->SaveToSession(); // Save file value to Session
if (is_null($CCEStudentAssignments->AssignmentFile4->Upload->Value)) {
$rsnew['AssignmentFile4'] = NULL;
} else {
$rsnew['AssignmentFile4'] = ew_UploadFileNameEx(ew_UploadPathEx(TRUE, $CCEStudentAssignments->AssignmentFile4->UploadPath), $CCEStudentAssignments->AssignmentFile4->Upload->FileName);
}
// AssignmentFile5
$CCEStudentAssignments->AssignmentFile5->Upload->SaveToSession(); // Save file value to Session
if (is_null($CCEStudentAssignments->AssignmentFile5->Upload->Value)) {
$rsnew['AssignmentFile5'] = NULL;
} else {
$rsnew['AssignmentFile5'] = ew_UploadFileNameEx(ew_UploadPathEx(TRUE, $CCEStudentAssignments->AssignmentFile5->UploadPath), $CCEStudentAssignments->AssignmentFile5->Upload->FileName);
}
// Comments
$CCEStudentAssignments->Comments->SetDbValueDef($rsnew, $CCEStudentAssignments->Comments->CurrentValue, NULL, FALSE);
// DateSubmitted
$CCEStudentAssignments->DateSubmitted->SetDbValueDef($rsnew, ew_UnFormatDateTime($CCEStudentAssignments->DateSubmitted->CurrentValue, 5, FALSE), NULL);
// Passed
$CCEStudentAssignments->Passed->SetDbValueDef($rsnew, $CCEStudentAssignments->Passed->CurrentValue, NULL, TRUE);
// RulingCode
$CCEStudentAssignments->RulingCode->SetDbValueDef($rsnew, $CCEStudentAssignments->RulingCode->CurrentValue, NULL, FALSE);
// AssignmentScore
$CCEStudentAssignments->AssignmentScore->SetDbValueDef($rsnew, $CCEStudentAssignments->AssignmentScore->CurrentValue, NULL, FALSE);
// ScoredBy
$CCEStudentAssignments->ScoredBy->SetDbValueDef($rsnew, $CCEStudentAssignments->ScoredBy->CurrentValue, NULL, FALSE);
// Remarks
$CCEStudentAssignments->Remarks->SetDbValueDef($rsnew, $CCEStudentAssignments->Remarks->CurrentValue, NULL, FALSE);
// MsgAttachment
$CCEStudentAssignments->MsgAttachment->Upload->SaveToSession(); // Save file value to Session
if (is_null($CCEStudentAssignments->MsgAttachment->Upload->Value)) {
$rsnew['MsgAttachment'] = NULL;
} else {
$rsnew['MsgAttachment'] = ew_UploadFileNameEx(ew_UploadPathEx(TRUE, $CCEStudentAssignments->MsgAttachment->UploadPath), $CCEStudentAssignments->MsgAttachment->Upload->FileName);
}
// Extended
$CCEStudentAssignments->Extended->SetDbValueDef($rsnew, $CCEStudentAssignments->Extended->CurrentValue, 0, TRUE);
// CCEStudentID
if ($CCEStudentAssignments->CCEStudentID->getSessionValue() <> "") {
$rsnew['CCEStudentID'] = $CCEStudentAssignments->CCEStudentID->getSessionValue();
}
// Call Row Inserting event
$bInsertRow = $CCEStudentAssignments->Row_Inserting($rsnew);
if ($bInsertRow) {
if (!ew_Empty($CCEStudentAssignments->AssignmentFile1->Upload->Value)) {
$CCEStudentAssignments->AssignmentFile1->Upload->SaveToFile($CCEStudentAssignments->AssignmentFile1->UploadPath, $rsnew['AssignmentFile1'], FALSE);
}
if (!ew_Empty($CCEStudentAssignments->AssignmentFile2->Upload->Value)) {
$CCEStudentAssignments->AssignmentFile2->Upload->SaveToFile($CCEStudentAssignments->AssignmentFile2->UploadPath, $rsnew['AssignmentFile2'], FALSE);
}
if (!ew_Empty($CCEStudentAssignments->AssignmentFile3->Upload->Value)) {
$CCEStudentAssignments->AssignmentFile3->Upload->SaveToFile($CCEStudentAssignments->AssignmentFile3->UploadPath, $rsnew['AssignmentFile3'], FALSE);
}
if (!ew_Empty($CCEStudentAssignments->AssignmentFile4->Upload->Value)) {
$CCEStudentAssignments->AssignmentFile4->Upload->SaveToFile($CCEStudentAssignments->AssignmentFile4->UploadPath, $rsnew['AssignmentFile4'], FALSE);
}
if (!ew_Empty($CCEStudentAssignments->AssignmentFile5->Upload->Value)) {
$CCEStudentAssignments->AssignmentFile5->Upload->SaveToFile($CCEStudentAssignments->AssignmentFile5->UploadPath, $rsnew['AssignmentFile5'], FALSE);
}
if (!ew_Empty($CCEStudentAssignments->MsgAttachment->Upload->Value)) {
$CCEStudentAssignments->MsgAttachment->Upload->SaveToFile($CCEStudentAssignments->MsgAttachment->UploadPath, $rsnew['MsgAttachment'], FALSE);
}
$conn->raiseErrorFn = 'ew_ErrorFn';
$AddRow = $conn->Execute($CCEStudentAssignments->InsertSQL($rsnew));
$conn->raiseErrorFn = '';
} else {
if ($CCEStudentAssignments->CancelMessage <> "") {
$this->setMessage($CCEStudentAssignments->CancelMessage);
$CCEStudentAssignments->CancelMessage = "";
} else {
$this->setMessage($Language->Phrase("InsertCancelled"));
}
$AddRow = FALSE;
}
if ($AddRow) {
$CCEStudentAssignments->CCEStudentAssigID->setDbValue($conn->Insert_ID());
$rsnew['CCEStudentAssigID'] = $CCEStudentAssignments->CCEStudentAssigID->DbValue;
// Call Row Inserted event
$CCEStudentAssignments->Row_Inserted($rsnew);
}
// AssignmentFile1
$CCEStudentAssignments->AssignmentFile1->Upload->RemoveFromSession(); // Remove file value from Session
// AssignmentFile2
$CCEStudentAssignments->AssignmentFile2->Upload->RemoveFromSession(); // Remove file value from Session
// AssignmentFile3
$CCEStudentAssignments->AssignmentFile3->Upload->RemoveFromSession(); // Remove file value from Session
// AssignmentFile4
$CCEStudentAssignments->AssignmentFile4->Upload->RemoveFromSession(); // Remove file value from Session
// AssignmentFile5
$CCEStudentAssignments->AssignmentFile5->Upload->RemoveFromSession(); // Remove file value from Session
// MsgAttachment
$CCEStudentAssignments->MsgAttachment->Upload->RemoveFromSession(); // Remove file value from Session
return $AddRow;
}
// Set up master/detail based on QueryString
function SetUpMasterDetail() {
global $CCEStudentAssignments;
$bValidMaster = FALSE;
// Get the keys for master table
if (@$_GET[EW_TABLE_SHOW_MASTER] <> "") {
$sMasterTblVar = $_GET[EW_TABLE_SHOW_MASTER];
if ($sMasterTblVar == "") {
$bValidMaster = TRUE;
$this->sDbMasterFilter = "";
$this->sDbDetailFilter = "";
}
if ($sMasterTblVar == "CCEAssignments") {
$bValidMaster = TRUE;
$this->sDbMasterFilter = $CCEStudentAssignments->SqlMasterFilter_CCEAssignments();
$this->sDbDetailFilter = $CCEStudentAssignments->SqlDetailFilter_CCEAssignments();
if (@$_GET["CCEAssignmentID"] <> "") {
$GLOBALS["CCEAssignments"]->CCEAssignmentID->setQueryStringValue($_GET["CCEAssignmentID"]);
$CCEStudentAssignments->CCEAssignmentID->setQueryStringValue($GLOBALS["CCEAssignments"]->CCEAssignmentID->QueryStringValue);
$CCEStudentAssignments->CCEAssignmentID->setSessionValue($CCEStudentAssignments->CCEAssignmentID->QueryStringValue);
if (!is_numeric($GLOBALS["CCEAssignments"]->CCEAssignmentID->QueryStringValue)) $bValidMaster = FALSE;
$this->sDbMasterFilter = str_replace("@CCEAssignmentID@", ew_AdjustSql($GLOBALS["CCEAssignments"]->CCEAssignmentID->QueryStringValue), $this->sDbMasterFilter);
$this->sDbDetailFilter = str_replace("@CCEAssignmentID@", ew_AdjustSql($GLOBALS["CCEAssignments"]->CCEAssignmentID->QueryStringValue), $this->sDbDetailFilter);
} else {
$bValidMaster = FALSE;
}
}
if ($sMasterTblVar == "CCEStudents") {
$bValidMaster = TRUE;
$this->sDbMasterFilter = $CCEStudentAssignments->SqlMasterFilter_CCEStudents();
$this->sDbDetailFilter = $CCEStudentAssignments->SqlDetailFilter_CCEStudents();
if (@$_GET["CCEStudentID"] <> "") {
$GLOBALS["CCEStudents"]->CCEStudentID->setQueryStringValue($_GET["CCEStudentID"]);
$CCEStudentAssignments->CCEStudentID->setQueryStringValue($GLOBALS["CCEStudents"]->CCEStudentID->QueryStringValue);
$CCEStudentAssignments->CCEStudentID->setSessionValue($CCEStudentAssignments->CCEStudentID->QueryStringValue);
if (!is_numeric($GLOBALS["CCEStudents"]->CCEStudentID->QueryStringValue)) $bValidMaster = FALSE;
$this->sDbMasterFilter = str_replace("@CCEStudentID@", ew_AdjustSql($GLOBALS["CCEStudents"]->CCEStudentID->QueryStringValue), $this->sDbMasterFilter);
$this->sDbDetailFilter = str_replace("@CCEStudentID@", ew_AdjustSql($GLOBALS["CCEStudents"]->CCEStudentID->QueryStringValue), $this->sDbDetailFilter);
} else {
$bValidMaster = FALSE;
}
}
if ($sMasterTblVar == "cstArchivedStudents2016") {
$bValidMaster = TRUE;
$this->sDbMasterFilter = $CCEStudentAssignments->SqlMasterFilter_cstArchivedStudents2016();
$this->sDbDetailFilter = $CCEStudentAssignments->SqlDetailFilter_cstArchivedStudents2016();
if (@$_GET["CCEStudentID"] <> "") {
$GLOBALS["cstArchivedStudents2016"]->CCEStudentID->setQueryStringValue($_GET["CCEStudentID"]);
$CCEStudentAssignments->CCEStudentID->setQueryStringValue($GLOBALS["cstArchivedStudents2016"]->CCEStudentID->QueryStringValue);
$CCEStudentAssignments->CCEStudentID->setSessionValue($CCEStudentAssignments->CCEStudentID->QueryStringValue);
if (!is_numeric($GLOBALS["cstArchivedStudents2016"]->CCEStudentID->QueryStringValue)) $bValidMaster = FALSE;
$this->sDbMasterFilter = str_replace("@CCEStudentID@", ew_AdjustSql($GLOBALS["cstArchivedStudents2016"]->CCEStudentID->QueryStringValue), $this->sDbMasterFilter);
$this->sDbDetailFilter = str_replace("@CCEStudentID@", ew_AdjustSql($GLOBALS["cstArchivedStudents2016"]->CCEStudentID->QueryStringValue), $this->sDbDetailFilter);
} else {
$bValidMaster = FALSE;
}
}
if ($sMasterTblVar == "cstArchivedStudents2017") {
$bValidMaster = TRUE;
$this->sDbMasterFilter = $CCEStudentAssignments->SqlMasterFilter_cstArchivedStudents2017();
$this->sDbDetailFilter = $CCEStudentAssignments->SqlDetailFilter_cstArchivedStudents2017();
if (@$_GET["CCEStudentID"] <> "") {
$GLOBALS["cstArchivedStudents2017"]->CCEStudentID->setQueryStringValue($_GET["CCEStudentID"]);
$CCEStudentAssignments->CCEStudentID->setQueryStringValue($GLOBALS["cstArchivedStudents2017"]->CCEStudentID->QueryStringValue);
$CCEStudentAssignments->CCEStudentID->setSessionValue($CCEStudentAssignments->CCEStudentID->QueryStringValue);
if (!is_numeric($GLOBALS["cstArchivedStudents2017"]->CCEStudentID->QueryStringValue)) $bValidMaster = FALSE;
$this->sDbMasterFilter = str_replace("@CCEStudentID@", ew_AdjustSql($GLOBALS["cstArchivedStudents2017"]->CCEStudentID->QueryStringValue), $this->sDbMasterFilter);
$this->sDbDetailFilter = str_replace("@CCEStudentID@", ew_AdjustSql($GLOBALS["cstArchivedStudents2017"]->CCEStudentID->QueryStringValue), $this->sDbDetailFilter);
} else {
$bValidMaster = FALSE;
}
}
}
if ($bValidMaster) {
// Save current master table
$CCEStudentAssignments->setCurrentMasterTable($sMasterTblVar);
// Reset start record counter (new master key)
$this->lStartRec = 1;
$CCEStudentAssignments->setStartRecordNumber($this->lStartRec);
$CCEStudentAssignments->setMasterFilter($this->sDbMasterFilter); // Set up master filter
$CCEStudentAssignments->setDetailFilter($this->sDbDetailFilter); // Set up detail filter
// Clear previous master key from Session
if ($sMasterTblVar <> "CCEAssignments") {
if ($CCEStudentAssignments->CCEAssignmentID->QueryStringValue == "") $CCEStudentAssignments->CCEAssignmentID->setSessionValue("");
}
if ($sMasterTblVar <> "CCEStudents") {
if ($CCEStudentAssignments->CCEStudentID->QueryStringValue == "") $CCEStudentAssignments->CCEStudentID->setSessionValue("");
}
if ($sMasterTblVar <> "cstArchivedStudents2016") {
if ($CCEStudentAssignments->CCEStudentID->QueryStringValue == "") $CCEStudentAssignments->CCEStudentID->setSessionValue("");
}
if ($sMasterTblVar <> "cstArchivedStudents2017") {
if ($CCEStudentAssignments->CCEStudentID->QueryStringValue == "") $CCEStudentAssignments->CCEStudentID->setSessionValue("");
}
} else {
$this->sDbMasterFilter = $CCEStudentAssignments->getMasterFilter(); // Restore master filter
$this->sDbDetailFilter = $CCEStudentAssignments->getDetailFilter(); // Restore detail filter
}
}
// 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";
}
// Form Custom Validate event
function Form_CustomValidate(&$CustomError) {
// Return error message in CustomError
return TRUE;
}
}
?>