⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 scoremodifyinput.jsp

📁 培训考试系统代码
💻 JSP
字号:
<%@ page contentType="text/html;charset=gb2312"%>

<%@ include file="/agt/public/jsp/top.jsp" %>



<!-- <title>业务代表管理系统评阅试卷页面</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:试题内容,6:试题分数,5:试题答案,2:答题结果,7:考生本题的分数,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)%>)&nbsp;<%=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">&nbsp; </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">&nbsp; </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">&nbsp; </td>

      <td height="25" class="td-cs2">得分:

	<input name="score" type="text" class="input1-1" size="8" value="<%=testScore%>">

	&nbsp;&nbsp;满分:<%=rs.getString(6)%>分</td>

    </tr>

    <tr>

      <td height="25" align="center" class="td-cs1">&nbsp; </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">&nbsp; </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%">&nbsp; </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>&nbsp; </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;


    //对所打的分数进行验证

    if(!(score.length > 1))

    {//只有一道题

	if(score == null || trim(score.value)=="" || !isNumber(score.value) )

	{

	   alert("对试题所评的分数为空或输入不为数字,请重新输入!");

	   score.focus();

	   return false;

	}
	scoreValue = parseInt(score.value);
	fillScoreValue = parseInt(fillScore.value);
	if(scoreValue < 0 || scoreValue > fillScoreValue)

	{

	   alert("试题的分数范围输入有误,请重新输入!");

	   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("对试题所评的分数为空或输入不为数字,请重新输入!");

	      score[i].focus();

	      return false;

	   }
	   
	   scoreValue = parseInt(score[i].value);
	   fillScoreValue = parseInt(fillScore[i].value);
	
	   if(scoreValue < 0 || scoreValue > fillScoreValue)

	   {
	      alert("试题的分数范围输入有误,请重新输入!");

	      score[i].focus();

	      return false;

	   }

	}

    }



    if( !window.confirm("是否真的要提交评分,请确认。"))

    {

	    return false ;

    }

    document.scoreform.submit();

}



</script>

<%@ include file="/agt/public/jsp/bot.jsp" %> 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -