Viewing file: resultRQAllCourseTe.php (22.93 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?
/* ไฟล์ resultRQAllCourseTe.php
คล้าย resultRQCourseTe.php
เพิ่ม คอรัม คะแนนเฉลี่ย แต่ละวิชาที่สอน
รายงานผลการประเมิน อาจารย์ผู้สอน รายวิชาที่สอน หรือในรายวิชาเปิดสอนทั้งหมด
ต้องการ รหัสอาจารย์
define flag 0,1 และ flag 8
echo '$acadYear = '.$acadYear.'<br>';
echo '$semester = '.$semester.'<br>';
echo '$crstype = '.$crstype.'<br>';
echo '$typeReport = '.$typeReport.'<br>';
echo '$course = '.$course.'<br>';
echo '$teacher = '.$teacher.'<br>';
echo '$class = '.$class.'<br>';
echo '$officerId = '.$officerId.'<br>';
echo '$programId = '.$programId.'<br>';
echo '$defineid = '.$defineid.'<br>';
*/
?>
<?
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/clsReg_Program.php";
include_once "../class/clsRegistration.php";
include_once "../class/clsCourseAssess.php";
include_once "../class/clsHoldCourse.php";
include_once "../class/clsClassAssess.php";
include_once "../class/clsClassOpenForAssess.php";
include_once "../class/clsClassInStructorAssess.php";
include_once "../class/clsOfficerAssess.php";
include_once "../class/clsDefineAssessment.php";
include_once "../class/clsAssessForm.php";
include_once "../class/clsDoAssessment.php";
include_once "../class/clsResultRQ.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/clsTimeTableAssess.php";
include_once "../class/clsMainExternalPlace.php";
include_once "../class/clsSubExternalPlace.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']);
$oReg = new Registration($oCA);
$oCourse = new CourseAssess($oCA);
$oClass = new ClassAssess($oCA);
$oClsOpen = new ClassOpenForAssess($oCA);
$oCIS = new ClassInStructorAssess($oCA);
$oOFA = new OfficerAssess($oCA);
$oHC = new HoldCourse($oCA);
$oAF = new AssessForm($oCA);
$oDo = new DoAssessment($oCA);
$oTTA=new TimeTableAssess($oCA);
$oMep = new MainExternalPlace($oCA);
$oSep = new SubExternalPlace($oCA);
$oProg = new Program($oCR);
$oProg->SearchByKey($programId);
$oProg->GetRecord();
$oDA = new DefineAssessment($oCA);
$oDA->SearchByDefineid($defineid);
$oDA->GetRecord();
$oAF->RSAssessFormByAssid($oDA->assid);
$oAF->GetRecord();
$assid = $oAF->assid;
$oSse = new SysSemesterDes($oCR);
$oSse->SearchByKey($semester);
$oSse->GetRecord();
//ค้นหาคำถามปลายเปิดในแบบประเมินนี้ sectionTQid = 1
$oSA = new SectionAll($oCA);
$CntSTQid = $oSA->RSCountSectionTQid($assid);
$oRRQ = new ResultRQ($oCA);
if(!isset($mepId)){
$mepId='%';
$sepId='%';
}
?>
<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="" border="1" 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">
<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 "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="" 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>รหัสวิชา</b></font></td>
<td align="center" colspan = "3"><font color="<?php echo $GLOBALS["COLOR_FONT_1"];?>" size="2"><b>รวม</b></font></td>
<? $numCrs = 0;
//loop course officer
$oCourse->RSCrsTeachDe($acadYear,$semester, $officerId,$defineid, $assid);
while($oCourse->GetRecord()) {
$arr_crs[$numCrs]=$oCourse->courseId;
?>
<td align="center" colspan="2"><font color="<?php echo $GLOBALS["COLOR_FONT_1"];?>" size="2">
<b><?=$oCourse->courseCode?></b></font></td>
<? $numCrs++;
}
//endloop course officer
?>
</tr>
<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>ค่า S.D. </b></font></td>
<td width="59" align="center"><font color="<?php echo $GLOBALS["COLOR_FONT_1"];?>" size="2"><b>แปลผล </b></font></td>
<? //loop numCrs
for($i=0;$i<$numCrs;$i++){
?>
<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>
<?
}//endloop numCrs
?>
</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"].'">';
}
}
?>
<td height="22"><? echo $index1."." ?> <? echo $oRQ->nameRQ ?></td>
<? if($CntSubQ == 0){
//คิดค่าเฉลี่ยและค่า sd ของคำถามข้อหลัก
$oRRQ->RSXbarSD($acadYear, $semester, $assid,$defineid, '%', $classId, $officerId, $ttId,$mepId,$sepId, $oRQ->RQid, $oSA->sectionRQid);
if($oRRQ->GetRecord()){
$xbar = $oRRQ->xbar;
$sd = $oRRQ->sd;
}
}
?>
<td align="center">
<? //if($xbar != 0) echo substr($xbar, 0, 4);//number_format($xbar,2);?>
<? if($CntSubQ != 0) echo "-";
else echo substr($xbar, 0, 4);
?>
</td>
<td align="center">
<? //if($xbar != 0) echo number_format($sd,2); ?>
<? if($CntSubQ != 0) echo "-";
else echo number_format($sd,2);
?>
</td>
<td align="center">
<? if($CntSubQ != 0) {
echo "-";
}else{
$oDS2 = new DetailScore($oCA);
$oDS2->getDStextBetweenCT($oHS->HSid,$xbar);
$oDS2->GetRecord();
echo $oDS2->DStext;
}
?>
</td>
<? for($i=0;$i<$numCrs;$i++){//loop numCrs
$oRRQ->RSXbarSD($acadYear, $semester, $assid,$defineid, $arr_crs[$i], $classId, $officerId, $ttId,$mepId,$sepId, $oRQ->RQid, $oSA->sectionRQid);
$oRRQ->GetRecord()
?>
<td align="center">
<? //if($xbar != 0) echo substr($xbar, 0, 4);//number_format($xbar,2);?>
<? if($CntSubQ != 0) echo "-";
else echo substr($oRRQ->xbar, 0, 4);
?>
</td>
<td align="center">
<? //if($xbar != 0) echo number_format($sd,2); ?>
<? if($CntSubQ != 0) echo "-";
else echo number_format($oRRQ->sd,2);
?> </td><?
}// end loop numCrs
?>
</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"].'">';
}
}
?>
<td height="22"><? echo $index1."." ?> <? echo $ocRQ->nameRQ ?></td>
<?//คิดค่าเฉลี่ยและค่า sd ขอคำถามข้อย่อย
$oRRQ->RSXbarSD($acadYear, $semester, $assid,$defineid, '%', $classId, $officerId, $ttId,$mepId,$sepId, $ocRQ->RQid, $oSA->sectionRQid);
if($oRRQ->GetRecord()){
$xbar = $oRRQ->xbar;
$sd = $oRRQ->sd;
}
?>
<td align="center">
<? //if($xbar != 0) echo substr($xbar, 0, 4);//number_format($xbar,2);?>
<? if($CntSubQ != 0) echo "-";
else echo substr($xbar, 0, 4);
?>
</td>
<td align="center">
<? //if($xbar != 0) echo number_format($sd,2); ?>
<? if($CntSubQ != 0) echo "-";
else echo number_format($sd,2);
?>
</td>
<td align="center">
<? if($CntSubQ != 0) {
echo "-";
}else{
$oDS2 = new DetailScore($oCA);
$oDS2->getDStextBetweenCT($oHS->HSid,$xbar);
$oDS2->GetRecord();
echo $oDS2->DStext;
}
?>
</td>
<? for($i=0;$i<$numCrs;$i++){//loop numCrs
$oRRQ->RSXbarSD($acadYear, $semester, $assid,$defineid, $arr_crs[$i], $classId, $officerId, $ttId,$mepId,$sepId, $ocRQ->RQid, $oSA->sectionRQid);
$oRRQ->GetRecord()
?>
<td align="center">
<? //if($xbar != 0) echo substr($xbar, 0, 4);//number_format($xbar,2);?>
<? if($CntSubQ != 0) echo "-";
else echo substr($oRRQ->xbar, 0, 4);
?>
</td>
<td align="center">
<? //if($xbar != 0) echo number_format($sd,2); ?>
<? if($CntSubQ != 0) echo "-";
else echo number_format($oRRQ->sd,2);
?> </td><?
}// end loop numCrs
?>
</tr>
<?
$index2++;
$index_color2++;
} //end while ocRQ
$index1++;
$index2 = 1;
$index_color1++;
} //end while oRQ
?>
<tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TABLE_1"];?>">
<td height="22" ><div align="right"><font size="2"><b>ภาพรวม</b> </font></div></td>
<?
//คิดค่าเฉลี่ยและค่า sd ของแต่ละส่วนคำถาม
$oRRQ->RSXbarSD($acadYear, $semester, $assid,$defineid, '%', $classId, $officerId, $ttId,$mepId,$sepId, '%', $oSA->sectionRQid);
if($oRRQ->GetRecord()){
$xbar = $oRRQ->xbar;
$sd = $oRRQ->sd;
}
?>
<td align="center"><b>
<? //if($xbar != 0) echo substr($xbar, 0, 4);//number_format($xbar,2);?>
<? if($CntSubQ != 0) echo "-";
else echo substr($xbar, 0, 4);
?>
</td>
<td align="center"> <b>
<? //if($xbar != 0) echo number_format($sd,2); ?>
<? if($CntSubQ != 0) echo "-";
else echo number_format($sd,2);
?>
</td>
<td align="center"><b>
<? if($CntSubQ != 0) {
echo "-";
}else{
$oDS2 = new DetailScore($oCA);
$oDS2->getDStextBetweenCT($oHS->HSid,$xbar);
$oDS2->GetRecord();
echo $oDS2->DStext;
}
?>
</td>
<? for($i=0;$i<$numCrs;$i++){//loop numCrs
$oRRQ->RSXbarSD($acadYear, $semester, $assid,$defineid, $arr_crs[$i], $classId, $officerId, $ttId,$mepId,$sepId, '%', $oSA->sectionRQid);
$oRRQ->GetRecord()
?>
<td align="center"><b>
<? //if($xbar != 0) echo substr($xbar, 0, 4);//number_format($xbar,2);?>
<? if($CntSubQ != 0) echo "-";
else echo substr($oRRQ->xbar, 0, 4);
?>
</td>
<td align="center"><b>
<? //if($xbar != 0) echo number_format($sd,2); ?>
<? if($CntSubQ != 0) echo "-";
else echo number_format($oRRQ->sd,2);
?> </td><?
}// end loop numCrs
?>
</tr>
<? /*----end คำนวน คำถาม----------*/ ?>
<?
} //end while oSRQ
} // end if oSA
$indexSection++;
} //end while oSA
?>
<tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_5"];?>"><td colspan=<?=4+$numCrs*2?> > </td></tr>
<tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TABLE_1"];?>">
<td height="22" ><div align="right"><font size="2"><b>รวมทั้งหมด</b> </font></div></td>
<?
$oRRQ->RSXbarSD($acadYear, $semester, $assid,$defineid, '%', $classId, $officerId, $ttId,$mepId,$sepId, '%', '%');
if($oRRQ->GetRecord()){
$xbar = $oRRQ->xbar;
$sd = $oRRQ->sd;
}
?>
<td align="center"><b>
<? //if($xbar != 0) echo substr($xbar, 0, 4);//number_format($xbar,2);?>
<? if($CntSubQ != 0) echo "-";
else echo substr($xbar, 0, 4);
?>
</td>
<td align="center"> <b>
<? //if($xbar != 0) echo number_format($sd,2); ?>
<? if($CntSubQ != 0) echo "-";
else echo number_format($sd,2);
?>
</td>
<td align="center"><b>
<? if($CntSubQ != 0) {
echo "-";
}else{
$oDS2 = new DetailScore($oCA);
$oDS2->getDStextBetweenCT($oHS->HSid,$xbar);
$oDS2->GetRecord();
echo $oDS2->DStext;
}
?>
</td>
<? for($i=0;$i<$numCrs;$i++){//loop numCrs
$oRRQ->RSXbarSD($acadYear, $semester, $assid,$defineid, $arr_crs[$i], $classId, $officerId, $ttId,$mepId,$sepId, '%', '%');
$oRRQ->GetRecord()
?>
<td align="center"><b>
<? //if($xbar != 0) echo substr($xbar, 0, 4);//number_format($xbar,2);?>
<? if($CntSubQ != 0) echo "-";
else echo substr($oRRQ->xbar, 0, 4);
?>
</td>
<td align="center"><b>
<? //if($xbar != 0) echo number_format($sd,2); ?>
<? if($CntSubQ != 0) echo "-";
else echo number_format($oRRQ->sd,2);
?> </td><?
}// end loop numCrs
?>
</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>
|