📄 mng_analyse_express.php
字号:
<?php session_start(); if(!$_SESSION['teacher']) {echo '<SCRIPT LANGUAGE="JavaScript">location.replace(\'mng.php\');</script>';exit;}?>
<html>
<head>
<title>EasyTeacher信息技术课堂教学助手(ItAssis)教师端-学生表现分析</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="et.css" rel="stylesheet" type="text/css">
<style type="text/css">
body,td,th {font-size: 14px;}
</style>
<script language="javascript" src="ItAssisJS/java.js"></script>
</head>
<body>
<table width="740" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="30" background="images/top_bg.jpg"><div align="left"> 位于:<a href="mng_analyse_score.php">学生积分分析</a><strong class="red"> </strong> <a href="mng_analyse_task.php">学生作业分析</a> <span class="red"><strong>学生表现分析</strong></span></div></td>
<td width="100" background="images/top_bg.jpg"><div align="left">[<a href="#explain">说明</a>]</div></td>
</tr>
</table>
<?php
include "config.inc.php";
include "conn.inc.php";
include "ItAssisFC/FLib.php";
include "ItAssisFC/CLib.php";
$db=Connect_db($CFG_DB_ADDRESS,$CFG_DB_PORT,$CFG_DB_NAME,$CFG_DB_OWNER,$CFG_DB_PWD);
if(isset($_GET['page'])) $page=trim($_GET['page']); else $page=0;
if(isset($_GET['per_page'])) $per_page=trim($_GET['per_page']); else $per_page=5;
if(isset($_GET['sid'])) $sid=trim($_GET['sid']); else $sid="";
if($sid=="") $sid="姓名";
if(isset($_GET['g_c'])) $g_c=trim($_GET['g_c']); else $g_c="all";
if($g_c!="all") list($g,$c)=split(",",$g_c);
if(isset($_GET['expid'])) $expid=trim($_GET['expid']);
if(isset($_GET['crs_id'])) $crs_id=trim($_GET['crs_id']); else $crs_id=0;
if(isset($_GET['eid'])) $eid=trim($_GET['eid']);
//撤销课堂表现********************************************************
if(isset($_GET['delete'])){
$sql="select evalue from express_dic where expid=$expid";
$result=mysql_query($sql,$db) or die("<b>$sql</b><br>" . mysql_error());
$array=mysql_fetch_array($result);
$sql="update stu set score=score-".$array['evalue']." where sid=\"$sid\" and score>0";
mysql_query($sql,$db) or die("<b>$sql</b><br>" . mysql_error());
$sql="delete from express where eid=\"$eid\"";
mysql_query($sql,$db) or die("<b>$sql</b><br>" . mysql_error());
echo "<p align=\"center\">已撤消<span class=\"red\">{$sid}</span>的课堂表现。<p>";
}
//构造导航条信息
$sql="
select grade,class,count(*) as total
from stu,express
where sid=stu_id
group by grade,class";
$result = mysql_query($sql,$db) or die("<b>$sql</b><br>" . mysql_error());
$g_c_item_msg="";
if($g_c!="all")
$g_c_item_msg.="<option value=\"$g,$c\">$g($c)班</option>";
$g_c_item_msg.="<option value=\"all\">所有班级</option>";
while($array=mysql_fetch_array($result)){
$tmp_g=$array['grade'];
$tmp_c=$array['class'];
$g_c_item_msg.="<option value=\"$tmp_g,$tmp_c\">$tmp_g($tmp_c)班[{$array['total']}人次]</option>";
}
$rsc_array=Read_course_List2($db);
$crs_item_msg="";
if($crs_id)
$crs_item_msg.="<option value=\"$crs_id\">当前课程</option>";
$crs_item_msg.="<option value=\"0\">所有课程</option>";
while($array=array_shift($rsc_array)){
$cid=$array['cid'];$type=$array['type'];$title=$array['title'];
if($type==0) $crs_item_msg.="<option value=\"$cid\">〖教材〗$title</option>";
else if($type==1) $crs_item_msg.="<option value=\"$cid\"> 〖章〗¶$title</option>";
else if($type==2) $crs_item_msg.="<option value=\"$cid\"> 〖节〗¶¶$title</option>";
else if($type==3) $crs_item_msg.="<option value=\"$cid\"> 【课程】¶¶¶$title</option>";
}
?>
<?php
//课堂表现列表****************************************************
if(isset($_GET['search'])){
$record_from=$page*$per_page;
$sql="
select sid,pic,grade,class,title,eid,time,expid,ename,evalue
from stu,express left join course on crs_id=cid
left join express_dic on exp_id=expid
where stu_id=sid";
if($g_c!="all")
$sql.=" and grade=$g and class=$c";
if($crs_id)
$sql.=" and cid=$crs_id";
if($sid!="姓名" )
$sql.=" and sid like \"%$sid%\"";
$result2=mysql_query($sql,$db) or die("<b>$sql</b><br>" . mysql_error());
$num=mysql_num_rows($result2);
$sql.=" order by sid,turn desc,grade,class";
$sql.=" limit $record_from,$per_page";
$result=mysql_query($sql,$db) or die("<b>$sql</b><br>" . mysql_error());
}
?>
<form name="form1" method="GET" action="">
<table width="740" height="20" border="0" align="center" cellpadding="0" cellspacing="0" background="images/top_bg.jpg" bgcolor="#DEEBF7">
<tr>
<td height="20">
<input name="sid" type="text" id="sid" title="请输入姓名" value="<?php if(isset($_GET['sid'])) echo $_GET['sid'];else echo "姓名";?>" size="8" maxlength="8">
<select name="g_c">
<?php echo $g_c_item_msg?>
</select>
<select name="crs_id">
<?php echo $crs_item_msg ?>
</select>
<input name="imageField" type="image" src="images/search.gif" width="25" height="17" border="0">
<?php if(isset($num))echo "<span class=red><strong>$num</strong></span>个结果"; ?>
<input name="search" type="hidden" id="search" value="1">
</td>
<td><input name="per_page" type="text" id="per_page" size="2" value="<?php echo $per_page; ?>">
个/页</td>
</tr>
</table>
</form>
<table width="740" border="2" align="center" cellpadding="0" cellspacing="0" bordercolor="#A5B2CE">
<tr bgcolor="#DEE3EF">
<td width="9%"><div align="center">姓名</div></td>
<td width="13%" valign="middle"><div align="center">班级</div></td>
<td width="32%" valign="middle"><div align="center">课程</div></td>
<td width="16%"><div align="center">课堂表现</div></td>
<td width="8%"><div align="center">得分</div></td>
<td width="15%"><div align="center">时间</div></td>
<td width="7%"><div align="center">操作</div></td>
</tr>
<?php
if(isset($num) && $num>0){
$image_msg="";
$base_url=$_SERVER['PHP_SELF']."?crs_id=$crs_id&g_c=$g_c";
while($array=mysql_fetch_array($result)){
if(!$array['title']) $array['title']="<span class=red>课程已删除<span>";
if(!$array['pic']) $array['pic']="none.jpg";
if(!$array['ename']) $array['ename']="<span class=red>课堂表现已删除<span>";
$time=Split_datatime($array['time']);
if(isset($_SESSION['image']) && $_SESSION['image']=="on")
$image_msg="<a href=\"$CFG_STU_PHOTO_DIR/{$array['pic']}\" target=_blank><img src=\"$CFG_STU_PHOTO_DIR/{$array['pic']}\" width=50 height=60 border=0 alt=点击看大图></a><br>";
$del_url="$base_url&search=1&delete=1&eid={$array['eid']}&expid={$array['expid']}&sid={$array['sid']}";
?>
<tr>
<td><div align="center"><?php echo "$image_msg{$array['sid']}" ?></div></td>
<td><div align="center"><?php echo "{$array['grade']}({$array['class']})班" ?></div></td>
<td><div align="center"><?php echo "{$array['title']}" ?></div></td>
<td><div align="center"><?php echo "{$array['ename']}" ?></div></td>
<td><div align="center"><?php echo "{$array['evalue']}" ?></div></td>
<td><div align="center"><?php echo $time ?></div></td>
<td><div align="center"><a href="Javascript:if(confirm('你确认撤消吗?'))location('<?php echo $del_url ?>');" title="撤销表现影响学生积分">撤销</a></div></td>
</tr>
<?php
}//end while
}//得分明细结束
?>
</table>
<br>
<div align="center">
<?php
if(isset($_GET['search'])){
$CC=new Page();
$CC->setCurrentpage($page);
$CC->setTotalpage($num/$per_page);
$CC->setStride(5);
echo "共<strong>".(floor($num/$per_page)+1)."</strong>页 ";
$CC->Pageprint("search=1&sid=$sid&g_c=$g_c&crs_id=$crs_id&per_page=$per_page");
}
?>
<br>
</div>
<table width="740" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#F7F3F7"><p><a name="explain"></a> 说明:
<ul>
<li class="explain_hight">默认搜索结果为全体学生 。 </li>
<li class="explain_hight">支持姓名模糊搜索。</li>
<li class="explain_hight"><span class="red">撤销</span>表现系统将还原学生分数。</li>
</ul></td>
</tr>
</table>
<p> </p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -