?? scoremodifyinput.jsp
字號:
<%@ page contentType="text/html;charset=gb2312"%>
<%@ include file="/agt/public/jsp/top.jsp" %>
<!-- <title>業(yè)務(wù)代表管理系統(tǒng)評閱試卷頁面</title>-->
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-->
</script>
<table width="539" border="0" cellpadding="3" cellspacing="1" class="table-cs1">
<tr>
<td height="25" colspan="2" class="td-cs1">考試名稱:<%= request.getParameter("examName")%></td></tr>
<tr>
<td width="40%" height="25" class="td-cs2">答卷人:<%= request.getParameter("replyStafffNo")%></td>
<td width="60%" height="25" class="td-cs2">答卷時間:<%= request.getParameter("examTime")%></td>
</tr>
</table>
<form name="scoreform" method="POST" action="/ScoreMan.do">
<input type="hidden" name="opeTypeQuery" value="<%=request.getParameter("opeTypeQuery")%>">
<input type="hidden" name="title" value="<%=request.getParameter("title")%>">
<input type="hidden" name="replyer" value="<%=request.getParameter("replyer")%>">
<input type="hidden" name="examName" value="<%=request.getParameter("examName")%>">
<input type="hidden" name="replyStafffNo" value="<%=request.getParameter("replyStafffNo")%>">
<input type="hidden" name="opeType" value="<%=OperatorFlagCode.SCOREMAN_DEALSCORE%>">
<input type="hidden" name="recordId" value="<%=request.getAttribute("recordId")%>">
<input type="hidden" name="paperId" value="<%=request.getAttribute("paperId")%>">
<input type="hidden" name="replyStaffNo" value="<%=request.getParameter("replyStafffNo")%>">
<input type="hidden" name="examTime" value="<%=request.getParameter("examTime")%>">
<table width="539" border="0" cellpadding="3" cellspacing="1" class="table-cs1">
<%
SysResultSet rs = (SysResultSet)request.getAttribute("SCOREMAN-GET-DETAILSET");
String optionRsSet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
if(rs != null)
{
for(int i=0;rs.setRecord(i)&&i<rs.getMetaData().getRecordCount();i++)
{
//4:試題類型名稱,3:試題內(nèi)容,6:試題分數(shù),5:試題答案,2:答題結(jié)果,7:考生本題的分數(shù),8:考題是選項,9:考題類型
%>
<tr>
<td width="8%" height="25" align="center" class="td-cs1"><%=i+1%>、</td>
<td width="92%" height="25" class="td-cs2">
<table border="0" cellpadding="3" cellspacing="0">
<tr>
<td class="td-cs2">(<%=rs.getString(4)%>) <%=rs.getString(3)%></td>
</tr>
<!-- huangyuyuan add 2004-06-21 -->
<!-- 顯示判斷題、單選題和多選題中可供選擇的項目 -->
<%
//對試題選項進行處理
int testType = Integer.parseInt(rs.getString(9));
int tempLoc = 0;
StringTokenizer tempStoken = new StringTokenizer(rs.getString(8),"#");
while(tempStoken.hasMoreTokens())
{
String tempOptionRs = optionRsSet.substring(tempLoc,tempLoc+1);
if(testType==1 || testType==2)
{
%>
<tr>
<td class="td-cs2" ><%=tempOptionRs%>.<input type="radio" name="A<%=rs.getString(1)%>" value="<%=tempOptionRs%>"><%=tempStoken.nextToken()%></td>
</tr>
<%
}
else if(testType==3)
{
%>
<tr>
<td class="td-cs2" ><%=tempOptionRs%>.<input type="checkbox" name="A<%=rs.getString(1)%>" value="<%=tempOptionRs%>"><%=tempStoken.nextToken()%></td>
</tr>
<%
}
else
{
tempStoken.nextToken();
}
tempLoc++;
}
%>
<!-- end -->
</table>
</td>
</tr>
<%
//對答題答案進行處理
int loc = 0;
String outcome = rs.getString(2);
StringTokenizer stoken = null;
if((null==outcome)||("".equals(outcome.trim())))
{
%>
<tr>
<td height="25" align="center" class="td-cs1"> </td>
<td height="25" class="td-cs2" style="word-break:break-all">考生沒有答這道題</td>
</tr>
<%
}
else
{
stoken = new StringTokenizer(outcome,"#");
while(stoken.hasMoreTokens())
{ String optionRs = optionRsSet.substring(loc,loc+1);
%>
<tr>
<td height="25" align="center" class="td-cs1"> </td>
<td height="25" class="td-cs2" style="word-break:break-all"><%=optionRs%>.<%=stoken.nextToken()%></td>
</tr>
<%
loc++;
}
}
///:huangyuyuan add 2004-06-06
String testScore = rs.getString(7);
testScore = (null==testScore)?"":testScore;
///:~
%>
<input type="hidden" name="testIds" value="<%=rs.getString(1)%>">
<input type="hidden" name="fillScore" value="<%=rs.getString(6)%>">
<tr>
<td height="25" align="center" class="td-cs1"> </td>
<td height="25" class="td-cs2">得分:
<input name="score" type="text" class="input1-1" size="8" value="<%=testScore%>">
滿分:<%=rs.getString(6)%>分</td>
</tr>
<tr>
<td height="25" align="center" class="td-cs1"> </td>
<td height="25" class="td-cs2">參考答案</td>
</tr>
<%
//對正確答案進行處理
loc = 0;
stoken = new StringTokenizer(rs.getString(5),"#");
while(stoken.hasMoreTokens())
{ String optionRs = optionRsSet.substring(loc,loc+1);
%>
<tr>
<td height="25" align="center" class="td-cs1"> </td>
<td height="25" class="td-cs2" style="word-break:break-all"><%=optionRs%>.<%=stoken.nextToken()%></td>
</tr>
<%
loc++;
}
}
}
%>
</table>
<table width="539" height="35" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center"> <table width="424" height="30" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="25%"> </td>
<td width="25%">
<input name="submit" type="image" onclick="submitScore();return false;" src="/agt/public/images/submit.gif" width="82" height="22" border="0" onmouseover="this.src='/agt/public/images/'+ this.name + '_2.gif';" onmouseout="this.src='/agt/public/images/'+ this.name + '.gif'">
</td>
<td> </td>
</tr>
</table></td>
</tr>
</table>
</form>
<script src="/agt/public/js/scriptfuns.js" type="text/javascript"></script>
<script src="/agt/public/js/my_functions.js" type="text/javascript"></script>
<script language="javascript">
function submitScore()
{
var score = document.scoreform.score;
var fillScore = document.scoreform.fillScore;
var scoreValue = 0;
var fillScoreValue = 0;
//對所打的分數(shù)進行驗證
if(!(score.length > 1))
{//只有一道題
if(score == null || trim(score.value)=="" || !isNumber(score.value) )
{
alert("對試題所評的分數(shù)為空或輸入不為數(shù)字,請重新輸入!");
score.focus();
return false;
}
scoreValue = parseInt(score.value);
fillScoreValue = parseInt(fillScore.value);
if(scoreValue < 0 || scoreValue > fillScoreValue)
{
alert("試題的分數(shù)范圍輸入有誤,請重新輸入!");
score.focus();
return false;
}
}
else
{//有多道題
for(var i=0;i<score.length;i++)
{
if(score[i] == null || trim(score[i].value)=="" || !isNumber(score[i].value) )
{
alert("對試題所評的分數(shù)為空或輸入不為數(shù)字,請重新輸入!");
score[i].focus();
return false;
}
scoreValue = parseInt(score[i].value);
fillScoreValue = parseInt(fillScore[i].value);
if(scoreValue < 0 || scoreValue > fillScoreValue)
{
alert("試題的分數(shù)范圍輸入有誤,請重新輸入!");
score[i].focus();
return false;
}
}
}
if( !window.confirm("是否真的要提交評分,請確認。"))
{
return false ;
}
document.scoreform.submit();
}
</script>
<%@ include file="/agt/public/jsp/bot.jsp" %>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -