Viewing file: esa_resultRQPjTe.php (17.1 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?
include_once "../../class/clsDB.php";
include_once "../../class/clsConnection.php";
include_once "../global.php";
include_once "../link/function.php";
include_once "../class/clsReg_SysSemesterDes.php";
include_once "../class/clsDefineAssessment.php";
include_once "../class/clsAssessForm.php";
include_once "../class/clsSectionAll.php";
include_once "../class/clsSectionRQ.php";
include_once "../class/clsHeaderQuestion.php";
include_once "../class/clsHeaderScore.php";
include_once "../class/clsDetailScore.php";
include_once "../class/clsRadioQuestion.php";
include_once "../class/clsSectionAll.php";
include_once "../class/clsEsa_ResultRQPj.php";
$oCR = new clsConnection($GLOBALS['HOST'], $GLOBALS['DB_REG'], $GLOBALS['USER_REG'], $GLOBALS['PASSWORD_REG']);
$oCA = new clsConnection($GLOBALS['HOST'], $GLOBALS['DB_EASS'], $GLOBALS['USER_EASS'], $GLOBALS['PASSWORD_EASS']);
$oAF = new AssessForm($oCA);
$oAF->RSAssessFormByAssid($assid);
$oAF->GetRecord();
$oSse = new SysSemesterDes($oCR);
$oSse->SearchByKey($semester);
$oSse->GetRecord();
$oDA = new DefineAssessment($oCA);
$oDA->SearchByDefineid($defineid);
$oDA->GetRecord();
if(!isset($acadYear))
$acadYear = $oDA->acadYear;
if(!isset($semester))
$semester = $oDA->semester;
//ค้นหาคำถามปลายเปิดในแบบประเมินนี้ sectionTQid = 1
$oSA = new SectionAll($oCA);
$CntSTQid = $oSA->RSCountSectionTQid($assid);
$oRRQ = new ResultRQPj($oCA);
?>
<title>รายงานทั่วไปของการประเมิน โดยจำแนกตามลักษณะคำถาม/ส่วน/หัวข้อการประเมิน</title>
<meta http-equiv="Content-Type" content="text/html; charset=tis-620">
<link href="../source/style.css" rel="stylesheet" type="text/css">
<table width="746" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="746"><br>
<div id="tabmargin">
<form name="pc" method="post" action="<?php echo $PHP_SELF;?>" enctype="multipart/form-data">
<div align="center">
<table width="658" border="0">
<tr>
<? if($CntSTQid != 0) { ?>
<td width="455" height="29" ><div align="right"></div></td>
<td width="110" background="../picture/coverBG.gif"><div align="center"><img src="../picture/RQ.png"><font size="2"> คำถามปลายปิด</font></div></td>
<td width="110" background="../picture/coverBG1.gif"><div align="center"><a href="esa_resultTQPjTe.php?defineid=<?=$defineid ?>&assid=<?=$assid ?>&pjid=<?=$pjid ?>"><img src="../picture/TQ.png" border="0"><font size="2"> คำถามปลายเปิด</font></a></div></td>
<? } else { ?>
<td width="455" height="29" ><div align="right"></div></td>
<td width="110" > </td>
<td width="110" background="../picture/coverBG.gif"><div align="center"><img src="../picture/RQ.png"><font size="2"> คำถามปลายปิด</font></div></td>
<? } ?>
</tr>
</table>
</div>
<table width="655" align="center" cellpadding="1" cellspacing="1" bgcolor="#0080C0">
<tr bgcolor="#FFFFFF">
<td>
<table width="649" align="center" border="0" cellpadding="0" cellspacing="1">
<tr>
<td width="647"> <table width="646" border="0" align="center">
<tr>
<td height="10"></td>
</tr>
</table>
<table width="612" align="center" cellpadding="1" cellspacing="1" bgcolor="<?php echo $GLOBALS['COLOR_BG_TD_6'];?>">
<tr>
<td height="22" align="center"><font size="2"><span class = "fontMark5">รายงานทั่วไปของการประเมิน โดยจำแนกตามลักษณะคำถาม/ส่วน/หัวข้อการประเมิน
</span></font></td>
</tr>
<tr>
<td width="606" height="22" align="center"><font size="2">
<span class = "fontMark6"> ส่วนของคำถามปลายปิด : ชนิดให้เลือกตอบอย่างใดอย่างหนึ่ง </span></font></td>
</tr>
</table>
<table width="95%" border="0" align="center">
<tr>
<td><hr></td>
</tr>
</table>
<br>
<? // -- Show Head Report --
include_once "esa_headReport.php";
?>
<?
$sumXbarTotal=0;
$sumSdTotal=0;
$oSA = new SectionAll($oCA);
$numSection= $oSA->RSCountSectionAll($assid);
$oSA->RSByKeyAss($assid);
$i = 0;
$indexSection = 1;
while ($oSA->GetRecord()){
/*---------------- กรณีที่เลือกเป็นคำถามชนิดปลายปิด------------------*/
if($oSA->sectionRQid != '0'){
$i++;
//สร้าง oSRQ แสดงหัวข้อของส่วนการประเมิน
$oSRQ = new SectionRQ($oCA);
$oSRQ->RSSectionRQAll($assid,$oSA->sectionRQid);
while($oSRQ->GetRecord()){
$oHQ = new HeaderQuestion($oCA);
$oHQ->RSHeaderAllBySection($assid,$oSA->sectionRQid);
$oHQ->GetRecord();
$oHS = new HeaderScore($oCA);
$oHS->RSHeadSAll($oHQ->HSid);
$oHS->GetRecord();
?>
<!--------------------------------- Tab1 คำถามปลายปิด -------------------------------------------->
<table width="582" align="center">
<tr> <td colspan="4" > </td></tr>
<tr>
<td colspan="3" valign="top"><font size="2"><span class = "fontMarkTD1"><? if($numSection == '1') { echo "คำอธิบาย"; } else { echo "ส่วนที่ ".$indexSection; }?></span> : </font></td>
<td width="518"><font size="2"><? echo $oSRQ->topicSectionRQ ;?></font></td>
</tr>
</table>
<br>
<table width="352" border="0" align="center" cellpadding="1" cellspacing="1" bordercolor="<?php echo $GLOBALS["COLOR_BORDER_TABLE_1"];?>">
<tr>
<td width="348" height="22">
<fieldset>
<legend> <font color="<?php echo $GLOBALS["COLOR_FONT_9"]; ?>" size="2">เกณฑ์ประเมินหรือพิจารณาค่าเฉลี่ย</font></legend>
<br>
<table width="86%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="silver">
<tr bgcolor="<?php echo $GLOBALS['COLOR_BG_TD_7'];?>">
<td width="43%" align="center"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>">ช่วงคะแนน</font></td>
<td width="57%" align="center">
<?php if($oHS->HStext == "") { ?>
<font size="2" color="<?php echo $GLOBALS['COLOR_FONT_3'];?>"> ** ยังไม่ได้กำหนด ** </font>
<? } else{ ?>
<font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><? echo $oHS->HStext ?></font>
<? } ?>
</td>
</tr>
<?
$ch = 0;
$full = 0;
$oDS = new DetailScore($oCA);
$oDS->RSDetailSAll($oHS->HSid);
while($oDS->GetRecord()){
?>
<tr>
<td align="center" bgcolor="#FFFFFF"><? echo $oDS->CTFirst ?> - <? echo $oDS->CTLast ?></td>
<td bgcolor="#FFFFFF" align="center"><? echo $oDS->DStext ?></td>
</tr>
<?
if($oDS->CTLast > $full)
$full = $oDS->CTLast;
$ch++;
} // end oDS
if($ch == 0){
?>
<tr bgcolor="#FFFFFF">
<td colspan="2" align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"];?>"> ** ยังไม่ได้กำหนด ** </font></td>
</tr>
<? } ?>
</table> <br>
</fieldset>
</td>
</tr>
</table><br>
<table width="95%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="silver">
<tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TABLE_2"];?>">
<td height="24" align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_1"];?>"><b><? echo $oHQ->HQtext ?></b></font></td>
<td width="59" align="center"><font color="<?php echo $GLOBALS["COLOR_FONT_1"];?>" size="2"><b>%</b></font></td>
<td width="59" align="center"><font color="<?php echo $GLOBALS["COLOR_FONT_1"];?>" size="2"><b>ค่าเฉลี่ย</b></font></td>
<td width="59" align="center"><font color="<?php echo $GLOBALS["COLOR_FONT_1"];?>" size="2"><b>ค่า S.D. </b></font></td>
<td width="59" align="center"><font color="<?php echo $GLOBALS["COLOR_FONT_1"];?>" size="2"><b>แปลผล </b></font></td>
</tr>
<? /*--------------------------------------------------------- คำนวนส่วนของคำถามข้อหลัก -------------------------------------------------------*/
$index1 = 1; $index2 = 1;
$index_color1 = 1; $index_color2 = 1;
$CntSubQ = 0; $xbar = 0; $sd = 0;
$oRQ = new RadioQuestion($oCA);
$oRQ->RSRadioQByKey($assid,$oSA->sectionRQid,1);
while($oRQ->GetRecord()){
$oCntRQ = new RadioQuestion($oCA);
$CntSubQ = $oCntRQ->RSCountSubRQid($assid,$oRQ->RQid,'2');
if($index_color2%2 == 0){//EEF2FB
if($index_color1%2 == 0){
echo '<tr bgcolor="'.$GLOBALS["COLOR_BG_TD_5"].'">';
}else{
echo '<tr bgcolor="'.$GLOBALS["COLOR_BG_TD_4"].'">';
}
}else{
if($index_color1%2 == 0){
echo '<tr bgcolor="'.$GLOBALS["COLOR_BG_TD_4"].'">';
}else{
echo '<tr bgcolor="'.$GLOBALS["COLOR_BG_TD_5"].'">';
}
}
if($CntSubQ == 0){
//คิดค่าเฉลี่ยและค่า sd ของคำถามข้อหลัก
$oRRQ->RSXbarSD($acadYear, $semester, $assid,$defineid,$pjid,'%', $oRQ->RQid, $oSA->sectionRQid);
if($oRRQ->GetRecord()){
$per = $oRRQ->per;
$xbar = $oRRQ->xbar;
$sd = $oRRQ->sd;
}
}
?>
<td height="22"><? echo $index1."." ?> <? echo $oRQ->nameRQ ?></td>
<td align="center">
<? if($xbar != 0) echo number_format($per,2);?>
<? if(($CntSubQ == 0)&&($numDoAss == 0)) echo "-"; ?>
</td>
<td align="center">
<? if($xbar != 0) echo substr($xbar, 0, 4);//number_format($xbar,2);?>
<? if(($CntSubQ == 0)&&($numDoAss == 0)) echo "-"; ?>
</td>
<td align="center">
<? if($xbar != 0) echo number_format($sd,2); ?>
<? if(($CntSubQ == 0)&&($numDoAss == 0)) echo "-"; ?>
</td>
<td align="center">
<?
if($CntSubQ == 0){
if($numDoAss == 0) {
echo "-";
}else{
$oDS2 = new DetailScore($oCA);
$oDS2->getDStextBetweenCT($oHS->HSid,$xbar);
$oDS2->GetRecord();
echo $oDS2->DStext;
}
}
?>
</td>
</tr>
<? /*--------------------------------------------------------- คำนวนส่วนของคำถามข้อย่อย-------------------------------------------------------*/
$xbarSub = 0; $sdSub = 0;
$ocRQ = new RadioQuestion($oCA);
$ocRQ->RSCheckLevel($assid,$oRQ->RQid);
while($ocRQ->GetRecord()){
if($index_color1%2 == 0){//EEF2FB
if($index_color2%2 == 0){
echo '<tr bgcolor="'.$GLOBALS["COLOR_BG_TD_4"].'">';
}else{
echo '<tr bgcolor="'.$GLOBALS["COLOR_BG_TD_5"].'">';
}
}else{
if($index_color2%2 == 0){
echo '<tr bgcolor="'.$GLOBALS["COLOR_BG_TD_5"].'">';
}else{
echo '<tr bgcolor="'.$GLOBALS["COLOR_BG_TD_4"].'">';
}
}
//คิดค่าเฉลี่ยและค่า sd ขอคำถามข้อย่อย
$oRRQ->RSXbarSD($acadYear, $semester, $assid,$defineid,$pjid,'%', $oRQ->RQid, $oSA->sectionRQid);
if($oRRQ->GetRecord()){
$perSub = $oRRQ->per;
$xbarSub = $oRRQ->xbar;
$sdSub = $oRRQ->sd;
$sumXBar+=$xbarSub;
}
?>
<td height="22"><? echo "<img src=\"../picture/blank1.gif\"border=\"0\">".$index1.".".$index2 ?> <? echo $ocRQ->nameRQ ?></td>
<td align="center">
<? if($xbarSub != 0) echo number_format($perSub,2); ?>
<? if($numDoAss == '0') echo "-"; ?>
</td>
<td align="center">
<? if($xbarSub != 0) echo substr($xbarSub, 0, 4);//number_format($xbarSub,2); ?>
<? if($numDoAss == '0') echo "-"; ?>
</td>
<td align="center">
<? if($xbarSub != 0) echo number_format($sdSub,2);?>
<? if($numDoAss == '0') echo "-"; ?>
</td>
<td align="center">
<? if($numDoAss == '0'){
echo "-";
}else{
$oDS2 = new DetailScore($oCA);
$oDS2->getDStextBetweenCT($oHS->HSid,$xbarSub);
$oDS2->GetRecord();
echo $oDS2->DStext;
}
?>
</td>
</tr>
<?
$index2++;
$index_color2++;
} //end while ocRQ
$index1++;
$index2 = 1;
$index_color1++;
} //end while oRQ
$oRRQ->RSXbarSD($acadYear, $semester, $assid,$defineid,$pjid,'%', '%', $oSA->sectionRQid);
if($oRRQ->GetRecord()){
$perTotal = $oRRQ->per;
$xbarTotal = $oRRQ->xbar;
$sdTotal = $oRRQ->sd;
$sumXbarTotal+=$oRRQ->xbar;
$sumSdTotal+=$oRRQ->sd;
}
?>
<tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TABLE_1"];?>">
<td height="22" ><div align="right"><font size="2"><b>ภาพรวม</b> </font></div></td>
<td align="center"><b><? echo number_format($perTotal,2); ?></b></td>
<td align="center"><b><? echo substr($xbarTotal, 0, 4);//number_format($xbarTotal,2); ?></b></td>
<td align="center"><b><? echo number_format($sdTotal,2); ?></b></td>
<td align="center">
<? if($numDoAss == '0'){
echo "-";
}else{
$oDS2 = new DetailScore($oCA);
$oDS2->getDStextBetweenCT($oHS->HSid,$xbarTotal);
$oDS2->GetRecord();
echo $oDS2->DStext;
}
?>
</td>
</tr>
</table>
<br> <br>
<?
} //end while oSRQ
} // end if oSA
$indexSection++;
} //end while oSA
$oRRQ->RSXbarSD($acadYear, $semester, $assid,$defineid,$pjid,'%', '%', '%');
//$oRRQ->SumXbarSD($acadYear, $semester, $assid,$defineid, $courseId, $classId, $officerId, $ttId, '%', '%');
$oRRQ->GetRecord();
?>
<table width="95%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="silver">
<tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TABLE_1"];?>">
<td height="22" ><div align="right"><font size="2"><b>รวมทั้งหมด</b> </font></div></td>
<td width="59" align="center"><b><? echo number_format($oRRQ->per, 2); ?></b></td>
<td width="59" align="center"><b><? echo substr($oRRQ->xbar, 0, 4)//substr($sumXbarTotal/$i, 0, 4);?></b></td>
<td width="59" align="center"><b><? echo number_format($oRRQ->sd,2);//number_format($sumSdTotal/$i,2); ?></b></td>
<td width="59" align="center">
<? if($numDoAss == '0'){
echo "-";
}else{
$oDS2 = new DetailScore($oCA);
$oDS2->getDStextBetweenCT($oHS->HSid,$oRRQ->xbar);
$oDS2->GetRecord();
echo $oDS2->DStext;
}
?>
</td>
</tr>
</table>
<br> </td>
</tr>
</table></td>
</tr>
</table>
</form>
</div>
</label>
<? if($CntSTQid != 0) { ?>
<table width="655" border="0" align="center">
<tr>
<td width="68" height="27"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"];?>"><strong>หมายเหตุ
: </strong></font></td>
<td width="668" colspan="2"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"];?>">เลือกคลิกอินเด็กซ์หรือข้อความ
"<img src="../picture/TQ.png" border="0"> คำถามปลายเปิด"
ที่อยู่ด้านบน เมื่อต้องการดูแบบประเมินในส่วนของคำถาม<u>ปลายเปิด</u>
</font></td>
</tr>
</table>
<? } ?>
</td>
</tr>
</table>
</body>
|