Viewing file: 2552-05-19-1.0.02-showDeTeachCourseAfSearch.php (18.88 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?
include_once "template.php";
showHeader();
include_once "../class/clsReg_SysSemesterDes.php";
include_once "../class/clsReg_Program.php";
include_once "../link/function.php";
include_once "../class/clsCourseAssess.php";
include_once "../class/clsHoldCourse.php";
include_once "../class/clsRegistration.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";
sendRequest();
$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);
$oDA = new DefineAssessment($oCA);
$oHC = new HoldCourse($oCA);
$oAF = new AssessForm($oCA);
$oOFA = new OfficerAssess($oCA);
$oClass = new ClassAssess($oCA);
$oClass->SearchByKey($classId);
$oClass->GetRecord();
$oClassIn = new ClassAssess($oCA);
$oClassIn_1 = new ClassAssess($oCA);
$oCIS = new ClassInStructorAssess($oCA);
$oCIS_1 = new ClassInStructorAssess($oCA);
$oClsOpen = new ClassOpenForAssess($oCA);
$oCourse = new CourseAssess($oCA);
$oCourse->SearchByKey($courseId);
$oCourse->GetRecord();
$oReg->RSRegisByStdIdAndClassId($studentId, $classId);
$oReg->GetRecord();
$now = GetNowDate();
list($y, $m, $d) = split('[-]', $now);
$y=$y+543;
$nowDate=$y."-".$m."-".$d;
$oSse = new SysSemesterDes($oCR);
$oSse->SearchByKey($sem);
$oSse->GetRecord();
$oProg = new Program($oCR);
?>
<script language="JavaScript1.2">
function selectProgram(){
location.replace('showDeTeachCourseAfSearch.php?courseId='+document.pc.courseId.value+'&acd='+document.pc.acd.value+'&sem='+document.pc.sem.value+'&programSearch='+document.pc.programSearch.value);
}
function selectTeacher(){
location.replace('showDeTeachCourseAfSearch.php?courseId='+document.pc.courseId.value+'&acd='+document.pc.acd.value+'&sem='+document.pc.sem.value+'&programSearch='+document.pc.programSearch.value+'&teacherSearch='+document.pc.teacherSearch.value);
}
function showDeFormCourse(){
document.pc.action = 'showDeFormCourse.php?courseId='+document.pc.courseId.value+'&acadYear='+document.pc.acd.value+'&semester='+document.pc.sem.value+'&programId='+document.pc.programSearch.value+'&officerId='+document.pc.teacherSearch.value+'&classId='+document.pc.groupSearch.value;
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=tis-620">
<link href="../source/style.css" rel="stylesheet" type="text/css">
<table width="742" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="742"><br>
<fieldset>
<legend><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"]; ?>"><a href="index.php?mm=1">ผลการประเมิน</a>
<img src="../picture/ico3.gif" align="absmiddle" border="0"><a href="searchFormByCourse.php"> ค้นหารายวิชาที่เปิดสอน
</a><img src="../picture/ico3.gif" width="10" height="10" border="0" align="absmiddle">รายวิชาแยกตามหลักสูตร/ผู้สอน/ชั้นปี/กลุ่ม</font></legend>
</legend>
<div align="center">
<form name="pc" method="post" action="<?php echo $PHP_SELF;?>"><br>
<input type="hidden" name="acd" value="<?=$acd?>" />
<input type="hidden" name="sem" value="<?=$sem?>" />
<input type="hidden" name="courseId" value="<?=$courseId?>" />
<table width="666" align="center" border="0" cellpadding="0" cellspacing="1">
<tr>
<td width="664" height="60">
<table width="592" border="0" align="center" cellpadding="1" cellspacing="1">
<tr bgcolor="<?php echo $GLOBALS['COLOR_BG_TD_7'];?>">
<td height="24"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><b><img src="../picture/bullet1.gif" border ="0"> ปีการศึกษา</b></font></td>
<td width="490"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><b>:</b>
<? echo $oSse->semesterName ?>/<? echo $acd ?></font></td>
</tr>
<tr bgcolor="<?php echo $GLOBALS['COLOR_BG_TD_11'];?>">
<td width="95" height="24"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><b><img src="../picture/bullet1.gif" border ="0"> รหัสรายวิชา</b></font></td>
<td><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><b>:</b>
</font><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><?php echo $oCourse->courseCode?>
(<?php echo $oCourse->courseCodeEng?>)</font><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><b></b></font><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"> </b>
</font></td>
</tr>
<tr bgcolor="<?php echo $GLOBALS['COLOR_BG_TD_7'];?>">
<td height="20"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><b><img src="../picture/bullet1.gif" border ="0"> ชื่อรายวิชา
</b></font></td>
<td><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><b>:</b></font> <font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>">
<?php echo $oCourse->courseName?></font><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>">
(<?php echo $oCourse->courseNameEng?>)</font></td>
</tr>
<tr bgcolor="<?php echo $GLOBALS['COLOR_BG_TD_11'];?>">
<td height="20"><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><b><img src="../picture/bullet1.gif" border ="0"> หน่วยกิต
</b></font></td>
<td><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"><b>:
</b> <?php echo $oCourse->courseUnit;?></font><font size="2" color="<?php echo $GLOBALS['COLOR_FONT_4'];?>"> </font></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="2"></td>
</tr>
<tr>
<td><br>
<? /*------------------------------------- 1. ผลการประเมินภาพรวมรายวิชา (จำแนกตามรายอาจารย์ผู้สอน) --------------------------------------*/ ?>
<table width="592" border="0" align="center" headerbgColor = "#B7B7B7">
<tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TABLE_6"];?>">
<td height="22" colspan="5" align="center"> </td>
</tr>
<tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_13"];?>">
<td height="23" colspan="5" valign="top"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"> <img src="../picture/bookmark.gif" width="12" height="13" border="0"> ผลการประเมินภาพรวมรายวิชา</font></td>
</tr>
<?
$chk_1= 0;
$i = 0;
$indexTD = 1;
$oClassIn->SearchByCourseIdAcadSem($courseId,$acd,$sem);
$rowClassIn = $oClassIn->GetRowSelected();
while($oClassIn->GetRecordJoin()){
$oDA->RSFlag5And6ByAcYSeClassId($acd,$sem,$oClassIn->classId);
if($oDA->GetRecord()){
if(($i%2) == 0){
echo '<tr bgcolor="'.$GLOBALS["COLOR_BG_TD_4"].'">';
$color_td = 'bgcolor="'.$GLOBALS["COLOR_BG_TD_4"].'"';
}else{
echo '<tr bgcolor="'.$GLOBALS["COLOR_BG_TD_14"].'">';
$color_td = 'bgcolor="'.$GLOBALS["COLOR_BG_TD_14"].'"';
}
?>
<td width="423" height="24" colspan="5" valign="top"> <font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><a href = "showDeFormCourse.php?classId=<? echo $oClassIn->classId ?>&courseId=<? echo $courseId ?>&officerId=0&acadYear=<? echo $acd ?>&semester=<? echo $sem ?>" onclick="return sendRequest(this);" onmouseover="window.status=''; return true;">
<img src = "../picture/select.gif" width="15" height="15" border="0">
<? if(($oClassIn->programId == 0) || ($oClassIn->programId == "")){
$z = 0;
$oClsOpen->SearchByClassId($oClassIn->classId);
/* while($oClsOpen->GetRecord()){
$oProg->SearchByKey($oClsOpen->programId);
$oProg->GetRecord();
$arrCls[$z] = $oProg->programName;
$z++;
} // end while oClsOpen
for($a=0;$a<=$z;$a++){
echo $arrCls[$a];
if($a < $z-1) echo ",<br>";
} */
$oClsOpen->GetRecord();
$oProg->SearchByKey($oClsOpen->programId);
$oProg->GetRecord();
echo $oProg->programName;
}else{
$oProg->SearchByKey($oClassIn->programId);
if($oProg->GetRecord()){
echo $oProg->programName;
}
}
?>
ชั้นปี<? echo $oClassIn->studentYear ?> กลุ่ม<? echo $oClassIn->section ?></a></font> </td>
</tr>
<? $indexTD++; $i++; $chk_1=1;
} //$oDA->num
} //end while ClassIn
if($chk_1 == 0){
?>
<tr align="center">
<td colspan="5" align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"];?>">** ไม่พบแบบประเมินที่ใช้กับรายรายวิชานี้ **</font></td>
</tr>
<? }
/*------------------------------------- 2. ผลการประเมินภาพรวมรายวิชา (จำแนกตามรายอาจารย์ผู้สอน) --------------------------------------*/
?>
<tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_13"];?>">
<td height="23" colspan="5" valign="top"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"> <img src="../picture/bookmark.gif" width="12" height="13" border="0"> ผลการประเมินภาพรวมรายวิชา (จำแนกตามรายอาจารย์ผู้สอน)</font></td>
</tr>
<? $chk_2 = 0; $i=0;
$indexTD = 1;
$oClassIn->JoinSearchByCourseIdAcadSemSectionGroupClassIdProgramId($courseId,$acd,$sem,1);
$rowClassIn = $oClassIn->GetRowSelected();
while($oClassIn->GetRecordJoin()){
if(($i%2) == 0){
echo '<tr bgcolor="'.$GLOBALS["COLOR_BG_TD_4"].'">';
$color_td = 'bgcolor="'.$GLOBALS["COLOR_BG_TD_4"].'"';
}else{
echo '<tr bgcolor="'.$GLOBALS["COLOR_BG_TD_14"].'">';
$color_td = 'bgcolor="'.$GLOBALS["COLOR_BG_TD_14"].'"';
} ?>
<td width="159" height="24" valign="top"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>">
<?
$blankIndex = 1;
echo " <img src=\"../picture/users.gif\" border =\"0\"> ";
$oCIS->RSClassInStructorAssessGroupOfficerId();
while($oCIS->GetRecord()){
$flagX = 0; $z = 0;
//echo "sc = ".$oClassIn->sectionClass;
//for($z=0;$z<$oClassIn->sectionClass;$z++){
while(($z<$oClassIn->sectionClass) && $flagX == 0){
//echo "<br> z ".$z;
//echo "classId ".$oClassIn->classId;
//echo "<br> classId = ".$oClassIn->classId." i = ".$z." flagX = ".$flagX;
$oCIS_1->SearchByClassIdOfficerId($oClassIn->classId+$z,$oCIS->officerId);
if($oCIS_1->GetRecord()){
$oOFA->SearchByKey($oCIS_1->officerId);
$oOFA->GetRecord();
if($blankIndex > 1) echo " <img src=\"../picture/blank1.gif\"> ";
echo " อ.".$oOFA->officerName." ".$oOFA->officerSurname."<br>";
$blankIndex++;
$flagX = 1; // ใ้ห้แสดงแค่รอบเดียว
} // end while oCIS_1
$z++;
} // end for / while i < sectionClass
$i++;
} // end while CIS
?>
</font> </td>
<? //} // end if indexTD ?>
<td width="423" height="24" colspan="4" valign="top"> <font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"><a href = "showDeFormCourseGpSec.php?classId=<? echo $oClassIn->classId ?>§ionClass=<? echo $oClassIn->sectionClass ?>&courseId=<? echo $courseId ?>&acadYear=<? echo $acd ?>&semester=<? echo $sem ?>" onclick="return sendRequest(this);" onmouseover="window.status=''; return true;">
<img src = "../picture/select.gif" width="15" height="15" border="0">
<? if(($oClassIn->programId == 0) || ($oClassIn->programId == "")){
$z = 0;
$oClsOpen->SearchByClassId($oClassIn->classId);
while($oClsOpen->GetRecord()){
$oProg->SearchByKey($oClsOpen->programId);
$oProg->GetRecord();
$arrCls[$z] = $oProg->programName;
/*if($oProg->programAbbr != ""){
$arrCls[$z] = $oProg->programAbbr;
}else{
$arrCls[$z] = "<img src = \"../picture/warn.png\" border = \"0\">";
}*/
$z++;
} // end while oClsOpen
for($a=0;$a<=$z;$a++){
echo $arrCls[$a];
if($a < $z-1) echo ",<br>";
}
}else{
$oProg->SearchByKey($oClassIn->programId);
if($oProg->GetRecord()){
echo $oProg->programName;
/*if($oProg->programAbbr != ""){
echo $oProg->programAbbr;
}else{
echo "<img src = \"../picture/warn.png\" border = \"0\">";
}*/
}
//echo $oClassA->programId;
}
?>
</a></font> </td>
</tr>
<? $indexTD++; $i++; $chk_2 = 1;
} //end while ClassIn
if($chk_2 == 0){
?>
<tr align="center">
<td colspan="2" align="center"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"];?>">** ไม่พบรายชื่ออาจารย์ผู้สอน เนื่องจากยังไม่ได้กำหนดอาจารย์ผู้สอนในระบบทะเบียนฯ **</font></td>
</tr>
<? }
/*------------------------------------- 3. ผลการประเมินรายวิชาแยกตามอาจารย์ผู้สอน --------------------------------------*/
?>
<tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_13"];?>">
<td height="23" colspan="5" valign="top"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_4"];?>"> <img src="../picture/bookmark.gif" width="12" height="13" border="0">
ผลการประเมินรายวิชาแยกตามอาจารย์ผู้สอน</font></td>
</tr>
<? /* -------------- SEARCH PROGRAM -------------- */ ?>
<tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_4"];?>">
<td colspan="5"> <img src = "../picture/select.gif" width="15" height="15" border="0">
<select name="programSearch" onChange="selectProgram()">
<?php if(!isset($programSearch)){ ?>
<option value="" selected> - - - เลือกหลักสูตร - - - </option>
<?php }
$oClass->DistinctProgramIdByCourseIdAcYSem($courseId,$acd,$sem);
while($oClass->GetRecordJoin()) {
$oProg->SearchByKey($oClass->programId);
$oProg->GetRecord();
$oProg->programName;
?>
<option value="<?php echo $oClass->programId;?>" <? if($oClass->programId == $programSearch) echo "selected"; ?>><?=$oProg->programName;?></option>
<?php } ?>
</select> </td>
</tr>
<? /* ----------------------- SEARCH TEACHER ------------------ */ ?>
<tr bgcolor="<?php echo $GLOBALS["COLOR_BG_TD_4"];?>">
<td colspan="5"> <img src="../picture/user.gif" border ="0" width="13" height="13">
<select name="teacherSearch" onchange="selectTeacher()">
<?php if(!isset($teacherSearch)){ ?>
<option value="%" selected> - - เลือกอาจารย์ - -</option>
<?php } ?>
<option value="%" <? if('%' == $teacherSearch) echo "selected"; ?>> - รวมอาจารย์ทุกท่าน -</option>
<?php $oCIS->RSByAcYSePgIdCoId($acd,$sem,$programSearch,$courseId);
while($oCIS->GetRecord()) {
$oOFA->SearchByKey($oCIS->officerId);
$oOFA->GetRecord();
?>
<option value="<?php echo $oCIS->officerId;?>" <? if($oCIS->officerId == $teacherSearch) echo "selected"; ?>><?php echo " อ.".$oOFA->officerName." ".$oOFA->officerSurname; ?></option>
<?php } ?>
</select>
<select name="groupSearch" onChange="groupTeacher()" >
<?php if(!isset($teacherSearch)){ ?>
<option value=" " selected> - เลือกกลุ่ม -</option>
<?php } ?>
<option value="%" <? if('%' == $teacherSearch) echo "selected"; ?>> - รวมทุกกลุ่ม -</option>
<?php
$oClass->RSByAcYSemPgIdCoIdOfId($acd,$sem,$programSearch,$courseId,$teacherSearch);
while($oClass->GetRecord()) {
?>
<option value="<?=$oClass->classId?>" ><?php echo 'ชั้นปี '.$oClass->studentYear.' / '.$oClass->section; ?></option>
<?php } ?>
</select>
<input type="submit" name="Submit" value="ตกลง" onclick="showDeFormCourse()" /> </td>
</tr>
<tr bgcolor="<?php echo $GLOBALS['COLOR_BG_TABLE_6'];?>">
<td height="13" colspan="5" align="right"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_1"];?>"> </font></td>
</tr>
</table>
<table width="100%" border="0" align="center">
<tr>
<td> </td>
</tr>
<tr>
<td height="26"><input type="button" name="back22" value="ย้อนกลับ" onClick=" location.href = 'searchFormByCourse.php?'">
<input type="button" name="back2" value="กลับสู่หน้าหลัก" onClick=" location.href = 'index.php?mm=1'">
</td>
</tr>
</table></td>
</tr>
</table>
<br>
</form></div></label>
</fieldset><br>
<table width="89%" border="0">
<tr>
<td width="11%"><font size="2" color="<?php echo $GLOBALS["COLOR_FONT_3"];?>"><strong>หมายเหตุ
: </strong></font></td>
<td width="89%" height="27" colspan="2"><font color="<?php echo $GLOBALS["COLOR_FONT_3"];?>" size="2">คลิกที่
<img src = "../picture/select.gif" border="0"> เพื่อเลือกอาจารย์ผู้สอนโดยแยกเป็นหลักกสูตร/ชั้นปี/กลุ่ม</font></td>
</tr>
<tr>
<td width="11%"> </td>
<td height="27" colspan="2"> </td>
</tr>
<? $oProg->SearchByProgramStatusY();
while($oProg->GetRecord()){ ?>
<tr>
<td width="11%"> </td>
<td height="27" colspan="2"> </td>
</tr>
<? } ?>
</table></td>
</tr>
</table>
<form name="silent" id="silent" style="margin:0px; padding: 0px;" method="post"></form>
<?php
showFooter();
?>
|