Viewing file: 2551-11-11-1.0.01-clsForceAssess.php (4.5 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
class ForceAssess {
function GetDoAssessByStCodeAndAcYAndSe($studentCode, $acadYear, $semester, $programId) {
include_once "../link/function.php";
include_once "clsStudentAssess.php";
include_once "clsRegistration.php";
include_once "clsClassAssess.php";
include_once "clsClassInStructorAssess.php";
include_once "clsDefineAssessment.php";
include_once "clsHoldCourse.php";
include_once "clsDoAssessment.php";
include_once "clsTimeTableAssess.php";
include_once "clsHoldStudent.php";
include_once "clsDoAssessmentHStd.php";
include_once "clsHoldProgram.php";
$oCA = new clsConnection($GLOBALS['HOST'], $GLOBALS['DB_EASS'], $GLOBALS['USER_EASS'], $GLOBALS['PASSWORD_EASS']);
$oStd = new StudentAssess($oCA);
$oReg = new Registration($oCA);
$oClass = new ClassAssess($oCA);
$oCIS = new ClassInStructorAssess($oCA);
$oDA = new DefineAssessment($oCA);
$oHC = new HoldCourse($oCA);
$oDo = new DoAssessment($oCA);
$oTt = new TimeTableAssess($oCA);
$oHStd = new HoldStudent($oCA);
$oDoHStd = new DoAssessmentHStd($oCA);
$oHP = new HoldProgram($oCA);
$nowDate = getNowDateTh();
$oStd->SearchByStCodeAndStudying($studentCode);
$oStd->GetRecord();
$noAssFlag = 1;
$oReg->RSClassIdByStdId($oStd->studentId);
while($oReg->GetRecord()) {
$oClass->SearchByKey($oReg->classId);
$oClass->GetRecord();
$oCIS->SearchByClassIdGroupClassIdOfficerId($oReg->classId);
while($oCIS->GetRecord()) {
// case 0
$oDA->RSDefineAssessmentByFlagAndECDate(0, $nowDate);
while($oDA->GetRecord()) {
$oDo->CheckAssessment($oDA->defineid, $oStd->studentId, $oCIS->officerId, $oReg->classId, $oClass->section);
if(!$oDo->GetRecord())
$noAssFlag = 0;
} // end while $oDA
// case 1
$oDA->RSDefineAssessmentByFlagAndECDate(1, $nowDate);
while($oDA->GetRecord()) {
$oHC->SearchByDefineidClassId($oDA->defineid, $oReg->classId);
if($oHC->GetRecord()) {
$oDo->CheckAssessment($oDA->defineid, $oStd->studentId, $oCIS->officerId, $oReg->classId, $oClass->section);
if(!$oDo->GetRecord())
$noAssFlag = 0;
} // end while $oHC
} // end while $oDA
// case 8
$oDA->RSDefineAssessmentByFlagAndECDate(8, $nowDate);
while($oDA->GetRecord()) {
$oHC->SearchByDefineidClassId($oDA->defineid, $oReg->classId);
if($oHC->GetRecord()) {
$oDo->CheckAssessment($oDA->defineid, $oStd->studentId, $oCIS->officerId, $oReg->classId, $oClass->section);
if(!$oDo->GetRecord())
$noAssFlag = 0;
} // end while $oHC
} // end while $oDA
} // end while $oCIS
$oTt->RSTimeTableAssessByClId($oReg->classId);
while($oTt->GetRecord()) {
// case 7
$oDA->RSDefineAssessmentByFlagAndECDate(7, $nowDate);
while($oDA->GetRecord()) {
$oHC->SearchByDefineidClassId($oDA->defineid, $oReg->classId);
if($oHC->GetRecord()) {
$oDo->CheckAssessment2($oDA->defineid, $oStd->studentId, $oTt->ttOfId, $oTt->ttId, $oClass->section);
if(!$oDo->GetRecord())
$noAssFlag = 0;
} // end while $oHC
} // end while $oDA
} // end while $oTt
// case 5
$oDA->RSDefineAssessmentByFlagAndECDate(5, $nowDate);
while($oDA->GetRecord()) {
$oDo->CheckAssessment($oDA->defineid, $oStd->studentId, 0, $oReg->classId, $oClass->section);
if(!$oDo->GetRecord())
$noAssFlag = 0;
} // end while $oDA
// case 6
$oDA->RSDefineAssessmentByFlagAndECDate(6, $nowDate);
while($oDA->GetRecord()) {
$oHC->SearchByDefineidClassId($oDA->defineid, $oReg->classId);
if($oHC->GetRecord()) {
$oDo->CheckAssessment($oDA->defineid, $oStd->studentId, 0, $oReg->classId, $oClass->section);
if(!$oDo->GetRecord())
$noAssFlag = 0;
} // end while $oHC
} // end while $oDA
} // end while $oReg
// case 2
$oDA->RSDefineAssessmentByFlagAndECDate(2, $nowDate);
while($oDA->GetRecord()) {
$oHStd->RSHoldStudentByDfIdAndStY($oDA->defineid, $oStd->studentYear);
if($oHStd->GetRecord()) {
if(!$oDoHStd->CountCheckAssessment($oDA->defineid, $oStd->studentId))
$noAssFlag = 0;
} // end if $oHStd
} // end while $oDA
// case 3
$oDA->RSDefineAssessmentByFlagAndECDate(3, $nowDate);
while($oDA->GetRecord()) {
$oHP->SearchByDefineIdProgramIdStdYearAss($oDA->defineid, $programId, $oStd->studentYear);
if($oHP->GetRecord()) {
if(!$oDoHStd->CountCheckAssessment($oDA->defineid, $oStd->studentId))
$noAssFlag = 0;
} // end if $oHStd
} // end while $oDA
return $noAssFlag;
} // end function
} // end class
?>
|