?? admin_examscore.asp
字號(hào):
<%
option explicit
Response.expires=-1
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cache-control","no-store"
%>
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/function.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>考生成績(jī)管理</title>
<link href="admin.css" rel="stylesheet" type="text/css">
<style>
body {
font-size:12px;
}
</style>
</head>
<body>
<table width="90%" align="center" cellspacing="1" cellpadding="0" bgcolor="#FFFFFF" class="tborder">
<tr class="tdtbg">
<td align="center">
考 生 成 績(jī) 管 理
</td>
</tr>
<tr class="tdbg">
<td>
<a href="admin_examscore.asp">成績(jī)管理首頁(yè)</a> <a href="#" style="color:#00F;font-size:12px" onClick="window.print();">【打印本頁(yè)】</a>
</td>
</tr>
</table>
<br>
<%
dim strAction
if checkAdminLogin() = false then '進(jìn)行管理員登錄驗(yàn)證
response.redirect "admin_login.asp"
end if
if checkPurview(CONST_PURVIEW_PROJECT) = false then
response.write "<center><font size=4>你沒(méi)有進(jìn)行此操作的權(quán)限,請(qǐng)與系統(tǒng)管理員聯(lián)系!</font></center>"
response.write "</body></html>"
response.end
end if
strAction = trim(request.form("action"))
if strAction = "" then
strAction = trim(request.querystring("action"))
end if
select case strAction
case "zgscore"
call zgscore() '保存添加結(jié)果
case else
call main() '主界面
end select
sub main() '主界面
dim rsScore,strSqlScore,intMaxPage,I,intMaxPerPage,intCurPage,intCurRec,intCourseID
%>
</body>
</html>
<table width="90%" align="center" cellspacing="1" cellpadding="0" bgcolor="#FFFFFF" class="tborder">
<tr class="tdtbg">
<td width="80" align="center"> 考生</td>
<td align="center"> 課程 </td>
<td width="80" align="center"> 單選題得分 </td>
<td width="80" align="center"> 多選題得分 </td>
<td width="80" align="center"> 是非題得分 </td>
<td width="80" align="center"> 主觀題得分 </td>
<td width="80" align="center"><B> 成績(jī)</B> </td>
<td width="80" align="center"> 閱卷狀態(tài) </td>
<td width="150" align="center"> 操作 </td>
</tr>
<%
intMaxPerPage = 18 '定義每頁(yè)顯示多少條題目
if IsNumeric(Trim(request.querystring("page"))) = true then
intCurPage = CLng(Trim(request.querystring("page")))
else
intCurPage = 1
end if
if IsNumeric(Trim(request.querystring("courseid"))) = true then
intCourseID = CLng(Trim(request.querystring("courseid")))
else
intCourseID = 0
end if
set rsScore = server.createobject("ADODB.Recordset")
strSqlScore = "select SC.*,S.studentname,C.coursename from student_score SC,student S,project P,course C where SC.studentid=S.studentid and SC.prjid=P.prjid and P.courseid=C.courseid"
if intCourseID > 0 then
strSqlScore = strSqlScore & " and C.courseid=" & intCourseID
end if
strSqlScore = strSqlScore & " order by scoremark desc"
rsScore.open strSqlScore, G_CONN, 1, 1
rsScore.pagesize = intMaxPerPage
if intCurPage < 1 then
intCurPage = 1
elseif intCurPage > rsScore.pagecount then
intCurPage = rsScore.pagecount
end if
intMaxPage = rsScore.pagecount
if not rsScore.eof and not rsScore.bof then
rsScore.absolutepage = intCurPage
end if
if rsScore.bof or rsScore.eof then
response.write "<tr class='tdbg'><td colspan='9' align='center'>沒(méi)有學(xué)生成績(jī)</td></tr>"
end if
intCurRec = 1
dim intTotalScore
intTotalScore = 0
while not rsScore.eof and intCurRec <= intMaxPerPage
response.write "<tr class='tdbg'>"
response.write "<td align='center'>" & rsScore("studentname") & "</td>"
response.write "<td align='center'>" & rsScore("coursename") & "</td>"
response.write "<td align='center'>" & rsScore("DanX_score") & "</td>"
response.write "<td align='center'>" & rsScore("DuoX_score") & "</td>"
response.write "<td align='center'>" & rsScore("SF_score") & "</td>"
response.write "<td align='center'>" & rsScore("ZG_score") & "</td>"
intTotalScore = rsScore("DanX_score") + rsScore("DuoX_score") + rsScore("SF_score") + rsScore("ZG_score")
response.write "<td align='center'>" & intTotalScore & "</td>"
response.write "<td align='center'>" & rsScore("ScoreMark") & "</td>"
response.write "<td align='center'>"
response.write "<a href='admin_examscore.asp?action=zgscore&studentid=" & rsScore("studentid") & "&prjid="&rsScore("prjid")& "&coursename="&rsScore("coursename") & "'>主觀題閱卷</a>"
response.write "</td></tr>"
rsScore.movenext
intCurRec = intCurRec + 1
wend
rsScore.close
set rsScore = nothing
call closeConn()
%>
</table>
<center>
<%
call showPageCtrl(intMaxPage,intCurPage,"admin_examscore.asp?courseid=" & intCourseID & "&page=")
%>
</center>
<%
end sub
sub zgscore() '主觀題閱卷界面
dim rsScore, strSqlScore, intStudentID, intPrjID, strErr, strCourseName
strErr = ""
intStudentID = CLng(Trim(request.querystring("studentid")))
intPrjID = CLng(Trim(request.querystring("prjid")))
strCourseName = Trim(request.querystring("coursename"))
set rsScore = server.createobject("ADODB.Recordset")
strSqlScore = "select sc.*,p.zg_count from student_score sc,project p where sc.prjid=p.prjid and sc.studentid=" & intStudentID & "and sc.prjid=" & intPrjID
'Response.Write strSqlScore
'Response.End
rsScore.open strSqlScore,G_CONN,1,1
if rsScore.bof or rsScore.eof then
strErr = "<li>該學(xué)生成績(jī)不存在!</li>"
end if
if strErr <> "" then
call closeConn()
showErrMsg(strErr)
response.write "</body></html>"
exit sub
end if
dim intZGCount, intZGMark
intZGCount = rsScore("zg_count")
intZGMark = intZGCount * 10
%>
<script language="JAVAScript">
function saveScore(objScore) //保存主觀題得分
{
if (objScore.type == 'text')
{
window.open('saveScore.asp?intMark=0&score=' + objScore.value + '&id=' + objScore.name + '&prjid=<%=intPrjID%>&studentid=<%=intStudentID%>','fraSaveScore')
// alert(objScore.name);
}
objScore.focus();
}
function saveFinScore() //保存主觀題得分
{
window.open('saveScore.asp?intMark=1&prjid=<%=intPrjID%>&studentid=<%=intStudentID%>','fraSaveScore')
objScore.focus();
}
function chkup(chkinx)
{
//frmAdd.answer10.style.display="none";
switch(chkinx)
{
case 1: //單選題
divAnswer1.style.display="";
//divAnswer2.style.display="none";
//divAnswer3.style.display="";
//divAnswer4.style.display="none";
// break;
case 2: //多選題
// divAnswer1.style.display="";
// divAnswer2.style.display="none";
// divAnswer3.style.display="";
// divAnswer4.style.display="none";
// break;
}
}
</script>
<iframe name="fraSaveScore" style="visibility:hidden;height:0px" src=""></iframe>
<form name="frmSaveScore" action="admin_examscore.asp" method="post">
<input name="action" type="hidden" value="zgscore">
<input name="studentid" type="hidden" value="<%=intStudentID%>">
<input name="prjid" type="hidden" value="<%=intPrjID%>">
<input name="coursename" type="hidden" value="<%=strCourseName%>">
<table width="90%" align="center" cellspacing="1" cellpadding="0" bgcolor="#FFFFFF" class="tborder">
<tr class="tdtbg">
<td colspan="2" align="center"> 主觀題閱卷 </td>
</tr>
<tr class="tdbg">
<td width="130" align="right">所屬課程:</td>
<td>
<%=strCourseName%>
</td>
</tr>
<tr class="tdbg">
<td width="130" align="right">試題類型:</td>
<td>
單選題得分: <%=rsScore("DanX_score")%>
</td>
</tr>
<tr class="tdbg">
<td width="130" align="right">試題類型:</td>
<td>
多選題得分: <%=rsScore("DuoX_score")%>
</td>
</tr>
<tr class="tdbg">
<td width="130" align="right">試題類型:</td>
<td>
是非題得分: <%=rsScore("SF_score")%>
</td>
</tr>
</table>
<table width="90%" align="center" cellspacing="1" cellpadding="0" bgcolor="#FFFFFF" class="tborder">
<tr class="tdbg">
<td width="130" align="right">主觀題:</td>
<td>
</td>
</tr>
</table>
<table width="90%" align="center" cellspacing="1" cellpadding="0" bgcolor="#FFFFFF" class="tborder">
<%
'顯示主觀題
dim strSqlZGT, rsZGT
set rsZGT = server.createobject("ADODB.Recordset")
strSqlZGT = "select P_P.id,P_P.answer2,P_P.orderid,P_P.zgscore,S.content from prj_process P_P,subject S where S.type=4 and P_P.subid=S.id and P_P.studentid=" & intStudentID & " and P_P.prjid=" & intPrjID & " order by P_P.orderid"
rsZGT.open strSqlZGT,G_CONN,1,1
if not rsZGT.bof and not rsZGT.eof then
%>
<tr>
<td height="30">
<font size=3><strong>主觀題部分 (共<%=intZGCount%>題 每題10分 共<%=intZGMark%>分)</strong></font>
</td>
</tr>
<%
dim strid
while not rsZGT.eof
strid = rsZGT("id")
%>
<tr>
<td>
<strong><%=rsZGT("orderid")%>. </strong>
<%=rsZGT("content")%>
</td>
</tr>
<tr>
<td>
<textarea tag id="txtAnswer" name="txtAnswer" class="text" cols="80" rows="6" readonly><%=rsZGT("answer2")%></textarea><br>
得分:<input id="o<%=strid%>" name="<%=strid%>" type="text" class="text" size="10" maxlength="128" value="<%=rsZGT("zgscore")%>">
<input type="button" onClick="saveScore(o<%=strid%>);" value=" 保 存 " name="btn">
</td>
</tr>
<%
rsZGT.movenext
wend
end if
rsZGT.close
set rsZGT = nothing
call closeConn()
%>
<tr>
<td>
<input type="button" onClick="saveFinScore();" value=" 閱卷完畢 " name="btn">
</td>
</tr>
</table>
</form>
<%
end sub
%>
</body>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -