Viewing file: processAssFormTeacher.php (2.08 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
include_once "../global1.php";
include_once "../../class/clsConnection.php";
include_once "../../class/clsDB.php";
include_once "../class/clsDoAssessmentTeach.php";
include_once "../class/clsResultRQTeach.php";
include_once "../class/clsResultTQTeach.php";
//echo "<a href = \"courseShowAssessForm.php?studentId=$studentId&classId=25&courseId=$courseId\"><font color = \"red\"> <strong> ย้อนกลับ <strong> </font></a><br>";
$oCA = new clsConnection($GLOBALS['HOST'], $GLOBALS['DB_EASS'], $GLOBALS['USER_EASS'], $GLOBALS['PASSWORD_EASS']);
$oRRTe= new ResultRQTeach($oCA);
$oRTTe = new ResultTQTeach($oCA);
$oDoTe = new DoAssessmentTeach($oCA);
if($method=="add"){
//-------------------> เก็บค่าใส่ในตาราง DoAssessment
$y = date('Y');
$md = date('m-d');
$dateNow = ($y+543)."-".$md;
$oDoTe->AddNew();
$oDoTe->doTeachid=$doTeachid;
$oDoTe->defineid=$defineid;
$oDoTe->officerId=$officerId;
$oDoTe->dateAss=$dateNow;
$oDoTe->Save();
$maxDoHSid = $oDoTe->getMaxDoTeachid();
//echo "<br> SumRQ = ".$SumRQ;
//-------------------> เก็บค่าใส่ในตาราง ResultRQHStd
for($RowRQ=1; $RowRQ<=$SumRQ; $RowRQ++){
$sectionRQid = "sectionRQid".$RowRQ;
$MRQid = "MRQid".$RowRQ;
$selectMRQ = "selectMRQ".$RowRQ;
$oRRTe->AddNew();
$oRRTe->reTeachid=$reTeachid;
$oRRTe->doTeachid=$maxDoHSid;
$oRRTe->sectionRQid=${$sectionRQid};
$oRRTe->RQid=${$MRQid};
$oRRTe->point=${$selectMRQ};
$oRRTe->Save();
}
for($RowTQ=1; $RowTQ<=$SumTQ; $RowTQ++){
$sectionTQid = "sectionTQid".$RowTQ;
$TQid = "TQid".$RowTQ;
$commentText = "textTQ".$RowTQ;
$oRTTe->AddNew();
$oRTTe->reTeachid=$reTeachid;
$oRTTe->doTeachid=$maxDoHSid;
$oRTTe->sectionTQid=${$sectionTQid};
$oRTTe->TQid=${$TQid};
$oRTTe->comment=${$commentText};
$oRTTe->Save();
}
?>
<form name="SendMsgForm" method="post" action = "msgFormTeachComplete.php">
<input type="hidden" name="assid" value="<? echo $assid ?>">
<script type="text/javascript" language="JavaScript">
document.SendMsgForm.submit();
</script>
</form>
<?
}
//end if method
?>
|