Viewing file: clsForceAssess1.php (3.76 KB) -rwxr-xr-x 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 "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);
$oHStd = new HoldStudent($oCA);
$oDoHStd = new DoAssessmentHStd($oCA);
$oHP = new HoldProgram($oCA);
$nowDate = getNowDateTh();
$oStd->SearchByStCodeAndStudying($studentCode);
$oStd->GetRecord();
$noAssFlag = 1;
$oReg->RSEnrollItemByStIdAndAcYAndSe($oStd->studentId, $acadYear, $semester);
while($oReg->GetRecord()) {
$oClass->SearchByKey($oReg->classId);
$oClass->GetRecord();
$oCIS->SearchByClassIdGroupClassIdOfficerId($oReg->classId);
while($oCIS->GetRecord()) {
// case 0
$oDA->RSDefineAssessmentByAcYAndSeAndFlagAndECDate($acadYear, $semester, 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->RSDefineAssessmentByAcYAndSeAndFlagAndECDate($acadYear, $semester, 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
} // end while $oCIS
// case 5
$oDA->RSDefineAssessmentByAcYAndSeAndFlagAndECDate($acadYear, $semester, 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->RSDefineAssessmentByAcYAndSeAndFlagAndECDate($acadYear, $semester, 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->RSDefineAssessmentByAcYAndSeAndFlagAndECDate($acadYear, $semester, 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
$showGFlag3 = 0;
$oDA->RSDefineAssessmentByAcYAndSeAndFlagAndECDate($acadYear, $semester, 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
?>
|