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

📄 examscoredetail.jsp

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

<form name="onexamform" method="POST" action="/OnlineExam.do">
  <table width="550" border="0" cellpadding="3" cellspacing="1" class="table-cs1" align="center">

  <tr>
      <td height="25" align="center" class="td-cs1">考试名称:<%=request.getParameter("examName")%>
      </td>
  </tr>

</table>

    <table width="550" border="0" cellpadding="3" cellspacing="1" class="table-cs1" align="center">
    <%
        SysResultSet rs  =  (SysResultSet)request.getAttribute("ONLINETEST-GETTEST-RESULTSET");
        request.getSession().setAttribute("ONLINETEST-GETTEST-RESULTSET",rs);
        String optionRsSet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
        String publicResult = (String)request.getAttribute("EXAMPUBLICRESULT");
       

        if(rs != null)
        {   for(int i=0;rs.setRecord(i)&&i<rs.getMetaData().getRecordCount();i++)
            {
             //4:试题类型 5:试题类型名称,1:试题内容,9:试题选项,8:试题分数,10:试题答案
      %>
                <tr>

      <td width="20%" align="center" valign="top" class="td-cs2" ><%=i+1%>、(<%=rs.getString(5)%>)</td>
                <input type="hidden" name="testIds" value="<%=rs.getString(0)%>">
                <input type="hidden" name="testType" value="<%=rs.getString(4)%>">
                <input type="hidden" name="score" value="<%=rs.getString(8)%>">
                <input type="hidden" name="reply" value="">
                <input type="hidden" name="result" value="<%if(rs.getInt(4)==1 || rs.getInt(4)==2 || rs.getInt(4)==3){%><%=rs.getString(10)%><%}%>">
      <td valign="top" class="td-cs2" style="word-break:break-all">&nbsp;<%=rs.getString(1)%>&nbsp;总分:(<%=rs.getString(8)%>分)&nbsp;得分:(<%=rs.getString(15)%>分)
<table border="0" cellpadding="3" cellspacing="0">
          <%
                   
                   
                    //对试题选项进行处理
                    int testType = Integer.parseInt(rs.getString(4));
                    int loc = 0;

                    StringTokenizer stoken = new StringTokenizer(rs.getString(9),"#");
                    while(stoken.hasMoreTokens())
                    {   String optionRs = optionRsSet.substring(loc,loc+1);
                        if(testType==1 || testType==2)
                        {
                    %>
                          <tr>

      <td class="td-cs2" width="30"></td>

      <td class="td-cs2" ><%=optionRs%>.<input type="radio" name="A<%=rs.getString(0)%>" value="<%=optionRs%>"><%=stoken.nextToken()%></td>
                          </tr>

                    <%
                        }
                        else if(testType==3)
                        {
                     %>
                          <tr>

      <td class="td-cs2" width="30"></td>

      <td class="td-cs2" ><%=optionRs%>.<input type="checkbox" name="A<%=rs.getString(0)%>" value="<%=optionRs%>"><%=stoken.nextToken()%></td>
                          </tr>
                     <%
                        }
                        else
                        {
                     %>
                          <tr>

      <td class="td-cs2" width="30"></td>

      <td class="td-cs2" ><%=optionRs%>.
              <textarea name="A<%=rs.getString(0)%>" cols="45" rows="<%=stoken.nextToken()%>" class="remark"></textarea></td>
                          </tr>
                     <%
                        }
                        loc++;
                    }

%>


                    <%
                      //对试题答案进行显示
                      if(testType==1 || testType==2 || testType == 3)
                      {
                        
                      %>
                      
                      
                      <tr>

                         
                         
                         <%if( !rs.getString(10).equalsIgnoreCase(rs.getString(14)))
                           {%>            
 
                          <td class="td-cs2" colspan="2" >考试所答:<font color="#FF0000"><%=rs.getString(14)%></font></td>
                        <%}
                          else
                          {%>
                         <td class="td-cs2" colspan="2" >考试所答:<%=rs.getString(14)%></td>
                           
                          
                          <%}%>
                          </tr>
                          <tr>
               <%if("1".equalsIgnoreCase(publicResult))
                {%>
            
            <td class="td-cs2" colspan="2">正确答案:<%=rs.getString(10)%></td>
                          </tr>             
                <%}%>
                      <%  }else
                      {%>
                      <tr>           
            <td class="td-cs2" colspan="2">考试所答:</td>
                          </tr>      
                      <%
                          int tmpLoc = 0;
                          StringTokenizer resStoken = new StringTokenizer(rs.getString(14),"#");
                          while(resStoken.hasMoreTokens())
                          {   
                              String optionRs = optionRsSet.substring(tmpLoc,tmpLoc+1);
                       
                      %>
                          <tr>

                          <td class="td-cs2" width="30"></td>

                           <td class="td-cs2" ><%=optionRs%>.<%=resStoken.nextToken()%></td>
                         
                          </tr>

                    <%
                           tmpLoc++;
                           }   
                         if("1".equalsIgnoreCase(publicResult))
                         {                                                               
                                                                                     
                %>

<tr>           
            <td class="td-cs2" colspan="2">正确答案:</td>
                          </tr>      
                      <%
                          tmpLoc = 0;
                          StringTokenizer resStoken1 = new StringTokenizer(rs.getString(10),"#");
                          while(resStoken1.hasMoreTokens())
                          {   
                              String optionRs = optionRsSet.substring(tmpLoc,tmpLoc+1);
                       
                      %>
                          <tr>

                          <td class="td-cs2" width="30"></td>

                           <td class="td-cs2" ><%=optionRs%>.<%=resStoken1.nextToken()%></td>
                         
                          </tr>

                    <%
                           tmpLoc++;
                           }       
                           
                          }                                                           
                       }                                                               
                %>



</table>
 </td>
                </tr> <%             }
         }
     %>
</table>


                  

  <table width="539" height="30" border="0" cellpadding="0" cellspacing="0">
    <tr> 
      <td align="center"> <table width="424" height="35" border="0" cellpadding="0" cellspacing="0">
                            <tr> 
            <td width="25%">&nbsp; </td>
                              <td width="25%"> <input name="back" type="image" onclick="history.back();return false;" src="/agt/public/images/back.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>


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

⌨️ 快捷键说明

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