📄 scorestatics1.asp
字号:
<!--#include file="conn.inc"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新建网页 1</title>
<script language="javascript">
function ScorePassinfo(PID,score,pas)
{
page="conditionScoreDisplay.asp?test_id="+PID+"&maxScore="+score+"&pass="+pas;
window.open (page,'查看考试信息','width=500,height=470')
}
function analysis(myform)
{
str= myform.rangeScore.value;
// var a = str.match(/^(\d{1,2})(:)?(\d{1,2})\2(\d{1,2})$/);
var a = str.match(/^\d+$/)
if(a != null)
{
myform.action="scorestatics.asp";
return true;
}
else
{
alert("请输入正确的分数区间间隔,不能为负");
myform.rangeScore.value ="";
return false;
}
}
</script>
<link rel="stylesheet" type="text/css" href="css.css">
<%
v_PaperID = request("radioPaperID")
v_RangeScore = request("rangeScore")
sql="select * from paper_info where PaperID="&v_PaperID
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,3,2
v_Totalscore = rs("TotalPer")
v_PKnowID =rs("PKnow_ID")
rs.close
set rs = nothing
sql = "select count(*) as total from test_user where isTest = 1 and Paper_ID="&v_PaperID
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,3,2
v_totalPeple = rs("total")
rs.close
set rs = nothing
%>
<style type="text/css">
<!--
.style1 {
color: #FF0000;
font-weight: bold;
}
-->
</style>
</head>
<body>
<table border="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber2" height="25">
<tr>
<td width="100%">当前位置:<a href="news.asp">系统管理</a> > <a href="adminremarkpaper.asp">评卷管理</a> > 试卷分析</td>
</tr>
</table>
<p>
<form name="staticMethod" action="scorestatics.asp" method="post">
<table border="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber2" height="25">
<tr>
<td width="10%">试卷编号:<%=v_PaperID%> <input name="radioPaperID" type="hidden" id="radioPaperID" value="<%=v_PaperID%>"></td>
<td width="11%">参考人数:<%=v_totalPeple%></td>
<td width="79%"><div align="left">分析方式
<select name="select" onChange="submit()">
<option value="1">分数区间分析</option>
<option value="2">知 识 点分析</option>
<option value="3">题 型 分 析</option>
</select>
</div></td>
</tr>
</table>
</form>
</p>
<%if request("sta_method")="" or request("sta_method") =0 then %>
<table border="1" cellpadding="0" cellspacing="1" style="border-collapse: collapse" bordercolor="#C0C0C0" width="100%" id="AutoNumber3" height="20">
<form method="POST" name="form1" onSubmit="return submit();">
<input name="radioPaperID" type="hidden" value="<%=v_PaperID%>">
<tr>
<td width="120" bgcolor="#E1E1E1">
<p align="center">区间间隔</td>
<td> <p align="left">
<input name="rangeScore" type="text" class="inputnormal" id="rangeScore" onFocus="this.className='inputedit';this.select()" onBlur="this.className='inputnormal'" size="15">
注:只能为正整数 如:10,20,30 等</td>
<td width="59">
<p align="center">
<input border="0" value="分 析" name="I1" type="submit" onClick="analysis(this.form)" class="s02"></td>
</tr>
</form>
</table>
<form name="adminsubject" method="get" onSubmit="return submitit(this)">
<table border="1" cellpadding="0" cellspacing="1" style="border-collapse: collapse" bordercolor="#C0C0C0" width="100%" id="AutoNumber1">
<tr>
<td width="42" align="center" bgcolor="#E1E1E1" height="20"><b>序号</b> </td>
<td colspan="3" align="center" bgcolor="#E1E1E1">
分数区间</td>
<td width="330" align="left" bgcolor="#E1E1E1"><div align="center">通过人数</div></td>
<td width="199" align="left" bgcolor="#E1E1E1"><div align="center">未通过人数</div></td>
<td width="133" align="left" bgcolor="#E1E1E1"><div align="center">通过率</div></td>
</tr>
<%
if v_RangeScore <> "" then
v_RangeScore = trim(v_RangeScore)
'根据区间间隔确定应该分成多少个区间
n = v_Totalscore\v_RangeScore
m = v_Totalscore mod v_RangeScore
if m <> 0 then
n = n+ 1
end if
for i = 1 to n
%>
<tr>
<td nowrap align="center" bgcolor="#E1E1E1"><%=i%> </td>
<td nowrap width="58" align="left">
<strong>
<%
startScore=(i-1)*v_RangeScore
response.Write(startScore)
%>
</strong> </td>
<td nowrap width="87" align="left"><div align="center">至</div></td>
<td nowrap >
<strong>
<%
endScore =i*v_RangeScore
if endScore > v_Totalscore then
endScore = v_Totalscore
end if
response.Write(endScore)
%>
</strong> 分</td>
<td nowrap align="left">
<a href="javascript:ScorePassinfo(<%=v_PaperID%>,<%=startScore%>,1)">
<%
sql1 = "select count(*) as passN from student_score where Paper_ID = "&v_PaperID&" and Score > "&startScore&""
set rs1 = server.CreateObject("adodb.recordset")
rs1.open sql1,conn,3,2
v_passN=0
if not rs1.eof then
v_passN = rs1("passN")
end if
response.Write(v_passN)
%>
</a>人</td>
<td nowrap align="left"> <a href="javascript:ScorePassinfo(<%=v_PaperID%>,<%=startScore%>,0)">
<%
if v_totalPeple = 0 then
response.Write("0")
else
response.Write(v_totalPeple - v_passN)
end if
%>
</a>人</td>
<td nowrap align="left">
<%
if v_totalPeple = 0 then
response.Write("0%")
else
response.Write(v_passN/v_totalPeple *100 &"%")
end if
%>
</td>
</tr>
<%
next
end if
conn.close
set conn = nothing
%>
<caption>
</caption>
</table>
</form>
<%end if
if request("select") = "2" then %>
<form name="adminsubject" method="get" onSubmit="return submitit(this)">
<table border="1" cellpadding="0" cellspacing="1" style="border-collapse: collapse" bordercolor="#C0C0C0" width="100%" id="AutoNumber1">
<tr>
<td width="42" align="center" bgcolor="#E1E1E1" height="20"><b>序号</b> </td>
<td width="258" align="center" bgcolor="#E1E1E1"> 知识点</td>
<td width="354" align="left" bgcolor="#E1E1E1"><div align="center">通过人数</div></td>
<td width="199" align="left" bgcolor="#E1E1E1"><div align="center">未通过人数</div></td>
<td width="133" align="left" bgcolor="#E1E1E1"><div align="center">通过率</div></td>
</tr>
<%
v_PKnowID = split(v_PKnowID,",")
n = ubound(v_PKnowID)
for i = 1 to n
vknowid = trim(v_PKnowID(i))
sql = "select * from knowledge_info where KnowID ="&vknowid
set rs = server.CreateObject("adodb.recordset")
rs.open sql,conn,3,2
knowName = rs("KnowName")
knowid = rs("KnowID")
rs.close
set rs = nothing
sql = "select count(*) as unPass from stu_error_question where err_Que_ID IN (select QueID from question_database where Knowledge_ID = "&vknowid&" and QueID in (select Err_Que_ID from stu_error_question where Paper_ID = "&v_PaperID&" )) "
set rs = server.CreateObject("adodb.recordset")
rs.open sql,conn,3,2
v_unpass = rs("unPass")
rs.close
set rs = nothing
sql = "select count(User_ID) AS totalPeple from test_user where Paper_ID = "&v_PaperID&" AND istest = 1"
set rs = server.CreateObject("adodb.recordset")
rs.open sql,conn,3,2
v_total =rs ("totalPeple")
rs.close
set rs = nothing
%>
<tr>
<td nowrap align="center" bgcolor="#E1E1E1"><%=i%> </td>
<td align="left" nowrap><%=knowName%><%=knowid%></td>
<td nowrap align="left"> <a href="javascript:ScorePassinfo(<%=v_PaperID%>,<%=startScore%>,1)"> </a>
<%
v_pass = v_total - v_unpass
if v_pass <0 then
v_pass = 0
end if
response.Write(v_pass)
%>
人</td>
<td nowrap align="left"> <a href="javascript:ScorePassinfo(<%=v_PaperID%>,<%=startScore%>,0)"> </a><%=v_unpass%>人</td>
<td nowrap align="left">
<%
if v_pass < 0 or v_total <=0 then
passRate = 0
else
passRate = v_pass/v_total * 100
end if
response.Write(passRate)
%>
% </td>
</tr>
<%
next
conn.close
set conn = nothing
%>
<caption>
</caption>
</table>
</form>
<%end if%>
<p>注:1.点击<span class="style1">通 过 人数</span> 查看<em><strong>哪些人</strong></em>通过 </p>
<p>
2.点击<span class="style1">未通过人数 </span>查看<em><strong>哪些人未</strong></em>通过</p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -