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

📄 epaperdetail.jsp

📁 培训考试系统代码
💻 JSP
字号:
<%@ page contentType="text/html;charset=gb2312"%> 
<%@ include file="/agt/public/jsp/top.jsp" %>
<!-- title>培训考系统试卷的详细信息页面</title -->
<form name="epaperform" method="POST" action="/ExamPaperMan.do">
  <table width="539" border="0" cellpadding="3" cellspacing="1" class="table-cs1">
    <input type="hidden" name="status" value="1">
 <input type="hidden" name="opeType">
 <input type="hidden" name="paperId" value="<%=(String)request.getAttribute("paperId")%>">

    <tr class="td-cs2"> 
      <td colspan="2">名称:<%=request.getAttribute("title")%></td>
      <td colspan="2">所属类别:<%=ClassInfo.get((String)request.getAttribute("classId"))%></td>
 </tr>
 
    <tr class="td-cs2"> 
      <% 
        SysResultSet rs  =  (SysResultSet)request.getAttribute("EPAPER-QUERY-TESTSET");

        int allScore = 0;
        if(rs != null)
        {  for(int i=0;rs.setRecord(i)&&i<rs.getMetaData().getRecordCount();i++)
           {
               allScore += rs.getInt(2);
           }
        }
    
        int paperType = Integer.parseInt((String)request.getAttribute("paperType"));
        String paperTypeStr = "";
        if(paperType == 0) {paperTypeStr = "考试题";}
        else if(paperType == 1) {paperTypeStr = "自测题";}
        else {paperTypeStr = "考试题&自测题";}
  %>
      <td width="25%">类型:<%=paperTypeStr%> </td>
   <%
      int status = Integer.parseInt((String)request.getAttribute("testStatus"));
      String statusStr = "";
      if(status == 0) {statusStr = "编辑";}
      else if(status == 1) {statusStr = "发布";}
      else {statusStr = "取消";}
      
  %>

      <td width="25%">状态:<%=statusStr%> </td>
      <td width="25%">总题量:<%=rs.getMetaData().getRecordCount()%> </td>
      <td width="25%">总分数:<%=allScore%> </td>    
   
 </tr>
 </table>

                    <table width="539" border="0" cellpadding="3" cellspacing="1" class="table-cs1">
                      <%         
        if(rs != null)
        {  for(int i=0;rs.setRecord(i)&&i<rs.getMetaData().getRecordCount();i++)
           {
           //5:试题类型,7:试题难度,3:试题内容,8:试题选项,2:试题分数
      %>
                      <tr class="td-cs2"> 
                        <td width="80" valign="top"  class="td-cs2"><%=i+1%>、(<%=rs.getString(5)%>)</td>
                        <td valign="top" style="word-break:break-all"  class="td-cs2"><%=rs.getString(3)%>&nbsp;(<%=rs.getString(2)%>分)&nbsp;(<%=rs.getString(7)%>)
                          <%
		   int testType = rs.getInt(4);
		   String optionRsSet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
		   int loc = 0;
		     
		   StringTokenizer stoken = new StringTokenizer(rs.getString(8),"#");
		    
	           while(stoken.hasMoreTokens())
	           {  
		      String optionRs = optionRsSet.substring(loc,loc+1);
		     
		       if(testType == 1 || testType == 2)
		       {//判断题,单选题       
		 %> <table border="0" cellpadding="0" cellspacing="0">
                            <tr><td width="30"></td>
                              <td class="td-cs2"><%=optionRs%>.<input type="radio" name="option" value="<%=optionRs%>"> 
                                <%=stoken.nextToken()%></td>
                            </tr>
                          </table>
                          <%}
		       else if(testType == 3)
		       {//多选题
		     %> <table border="0" cellpadding="0" cellspacing="0">
                            <tr> <td width="30"></td>
                              <td class="td-cs2"><%=optionRs%>.<input type="checkbox" name="option" value="<%=optionRs%>"> 
                                <%=stoken.nextToken()%></td>
                            </tr>
                          </table>
                          <%    
		       }
		       else
		       {//填空题,问答题
		       %> <table border="0">
                            <tr> <td width="30"></td>
                              <td valign="top" class="td-cs2"><%=optionRs%>.
                                <textarea name="option" cols="55" rows="<%=stoken.nextToken()%>" class="remark"></textarea> 
                              </td>
                            </tr>
                          </table>
                          <% 
		       }
		       loc++;
		    }
	     }
	  }	    
	%> </td>
                      </tr>
                    </table>

  <table width="539" height="35" border="0" cellpadding="0" cellspacing="0">
    <tr> 
      <td height="35" align="center"> <table width="55%" height="20" border="0" cellpadding="0" cellspacing="0">
          <tr> 
            <td width="28%">&nbsp; </td>
            <td width="7%">&nbsp; </td>
            <td width="65%">
                                <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>
          </tr>
        </table></td>
    </tr>
  </table>
</form>
<%@ include file="/agt/public/jsp/bot.jsp" %> 

⌨️ 快捷键说明

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