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

📄 testmodverdict.jsp

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

<%@ page import="com.huawei.icd30.agt.code.*" %>

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

<!-- itle>业务代表管理系统录入试题</title -->

<br>

                  <form name="addtestform" method="POST" enctype="multipart/form-data" action="/servlet/com.huawei.icd30.agt.testman.TestModManServlet">

  <table width="539" border="0" cellpadding="3" cellspacing="1" class="table-cs1">

    <tr>

      <td align="center" class="td-cs1">试题题型</td>

      <td colspan="3" class="td-cs1"> <input name ="typeName" type="text" disabled class="input1" value="<%=request.getAttribute("typeName")%>" size="20">

        <input type="hidden" name ="testType" value="<%=request.getAttribute("testType")%>">

      </td>

    </tr>

    <input type="hidden" name="testId" value="<%=request.getAttribute("testId")%>">

    <input type="hidden" name="content" value="">

    <input type="hidden" name="optionRs" value="">

    <input type="hidden" name="option" value="">

    <input type="hidden" name="explain" value="">

    <input type="hidden" name="degree" value="">

    <input type="hidden" name="classId" value="<%=request.getAttribute("classId")%>">

    <input type="hidden" name="testMeans" value="">

    <input type="hidden" name="useLevel" value="">

    <input type="hidden" name="referenceTime" value="">

    <input type="hidden" name="queryTerm" value="<%=request.getParameter("queryTerm")%>">

    <input type="hidden" name="byClass" value="1">

    <tr align="center">

      <td  colspan="4" class="td-cs1">试题内容*</td>

    </tr>

    <tr>

      <td class="remark" colspan="4"> <%@ include file="../public/editor/editor.html" %></td>

    </tr>

    <%

     String optionRsSet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";

     int loc = 0;

     String testOption = (String)request.getAttribute("testOption");

     String result = (String)request.getAttribute("result");

     StringTokenizer stoken = new StringTokenizer(testOption,"#");

  %>

    <tr>

      <td align="center" class="td-cs1">试题选项*</td>

      <td colspan="3" class="td-cs2">

        <table border="0" cellpadding="0" cellspacing="0">

          <%

                 while(stoken.hasMoreTokens())

                 {

                     String optionRs = optionRsSet.substring(loc,loc+1);

               %>

          <tr>

            <td><%=optionRs%> <input type="radio" <%if(optionRs.equalsIgnoreCase(result)){%> checked <%}%> name="optionRsDis" value="<%=optionRs%>">

              <input name="optionDis" type="text" class="input2" value="<%=StringCode.webCode(stoken.nextToken())%>" size="43" maxlength="450"></td>

          </tr>

          <%loc++;

                }%>

        </table></td>

    <tr>

      <td align="center" class="td-cs1">简要说明</td>

      <td colspan="3" class="td-cs2"> <textarea name="explainDis" cols="55" rows="5" class="remark"><%=request.getAttribute("explain")%></textarea></td>

    </tr>

    <tr>

      <td width="15%" align="center" class="td-cs1">试题难度</td>

      <td width="35%" class="td-cs2"> <select name="degreeDis" class="input3">

          <% SysResultSet degreeRs  =  TestGetInfo.getDegreeRs();

        String degree = (String)request.getAttribute("degree");

        if(degreeRs != null)

        {  for(int i=0;degreeRs.setRecord(i)&&i<degreeRs.getMetaData().getRecordCount();i++)

           {

      %>

          <option value="<%=degreeRs.getString(0)%>" <%if( degree.equalsIgnoreCase(degreeRs.getString(0))){%> selected <%}%> ><%=degreeRs.getString(1)%></option>

          <%     }

         }

     %>

        </select> </td>

      <td width="15%" align="center" class="td-cs1">所属类别*</td>

                        <td width="35%" class="td-cs2">
                          <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="56%"><input name="className" type="text" class="input1" value="<%=ClassInfo.get((String)request.getAttribute("classId"))%>" size="18" readonly></td>
                              <td width="44%"><input name="choise" type="image" onClick="openClassWindow('/ClsMngOperatorAction.do?operatorFlag=<%=OperatorFlagCode.CLSMNG_CHOOSE%>&select=01','选择类别');;return false;" src="/agt/public/images/choise.gif" width="48" height="25" 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>

    <tr>

      <td align="center" class="td-cs1">测试手段</td>

      <td class="td-cs2"> <select  name="testMeansDis" class="input3">

          <% SysResultSet meansRs  =   TestGetInfo.getMeansRs();

        String testMeans = (String)request.getAttribute("testMeans");

        if(meansRs != null)

        {  for(int i=0;meansRs.setRecord(i)&&i<meansRs.getMetaData().getRecordCount();i++)

           {

      %>

          <option value="<%=meansRs.getString(0)%>" <%if( testMeans.equalsIgnoreCase(meansRs.getString(0))){%> selected <%}%>><%=meansRs.getString(1)%></option>

          <%     }

         }

     %>

        </select></td>

      <td align="center" class="td-cs1">答题参考时间</td>

      <td class="td-cs2" > <input name="referenceTimeDis" type="text" class="input1" value="<%=request.getAttribute("referenceTime")%>" size="18" maxlength="25">

        分钟</td>

    </tr>

    <td align="center" class="td-cs1">使用级别</td>

    <td colspan="3" class="td-cs2"> <select  name="useLevelDis" class="input3">

        <%String useLevel = (String)request.getAttribute("useLevel");

      %>

        <option value="0" <%if("0".equalsIgnoreCase(useLevel)){%> selected <%}%>>常用</option>

        <option value="1" <%if("1".equalsIgnoreCase(useLevel)){%> selected <%}%>>专用</option>

        <option value="2" <%if("2".equalsIgnoreCase(useLevel)){%> selected <%}%>>暂不使用</option>

      </select></td>

    </tr>

  </table>
                    <table width="539" height="30" border="0" cellpadding="0" cellspacing="0">
                      <tr>
                        <td height="35" align="center"> <table width="44%" height="25" border="0" cellpadding="0" cellspacing="0">
                            <tr align="left">
                              <td width="50%"><input name="submit" type="image" onClick="checkSubmit();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 width="50%"><input name="reset" type="image" onclick="resetForm();return false;" src="/agt/public/images/reset.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>

<form name="changetypeform" method="POST">

   <input type="hidden" name="testType" value="">

</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 checkSubmit()

{

    var hcontent = Composition.document.body.innerHTML;

    if(trim(hcontent)=="")

    {

        alert("试题内容不能为空,请输入!");

        return false;

    }

    if(hcontent.length >= 500)

    {

       alert("试题内容长度不能超过500个字符,输入已超过限制长度,请重新输入!")

       return false;

    }



    var explain = document.addtestform.explainDis;

    if(explain.value.length >= 250)

    {

       alert("试题简要说明不能超过250个字符,输入已超过限制长度,请重新输入!")

       explain.focus();
       
       return false;

    }



    var option = document.addtestform.optionDis;

    if(option[0]== null || trim(option[0].value)=="")

    {

       alert("试题的选项不能为空,请输入!");

       option[0].focus();

       return false;

    }

    if(option[1]== null || trim(option[1].value)=="")

    {

        alert("试题的选项不能为空,请输入!");

        option[1].focus();

        return false;

    }



    var classId = document.addtestform.classId;

    if(classId== null || trim(classId.value)=="")

    {

        alert("试题的所属类别不能为空,请输入!");

        return false;

    }



    document.addtestform.content.value = hcontent;



    //由于在include文件editor.html之后,取不到参数的值,所以做了如下的处理

    var optionRsDis = document.addtestform.optionRsDis;

    if(optionRsDis[0].checked == true)

    {

        document.addtestform.optionRs.value = optionRsDis[0].value;

    }

    else

    {

       document.addtestform.optionRs.value = optionRsDis[1].value;

    }

    document.addtestform.option.value = document.addtestform.optionDis[0].value + "#"

                                       + document.addtestform.optionDis[1].value;



    document.addtestform.explain.value = document.addtestform.explainDis.value;



    document.addtestform.degree.value = document.addtestform.degreeDis.value;

    document.addtestform.testMeans.value = document.addtestform.testMeansDis.value;

    document.addtestform.useLevel.value = document.addtestform.useLevelDis.value;

     document.addtestform.referenceTime.value = document.addtestform.referenceTimeDis.value



    document.addtestform.submit();

}

///:huangyuyuan modify 2004-06-26
//对编辑器里面的文件进行编码,把"\"修改为"\\",这样编辑器就不会把反斜杠认为是转义字符了
var oldContent = '<%=OperateUtility.convertStr(StringCode.editCode((String)request.getAttribute("content")))%>' ;
///:~

function resetForm()

{

   document.addtestform.reset();

   Composition.document.body.innerHTML=oldContent;

}



/**

 * body.onload()调用此脚本作必要的预处理.

 **/


function docPreload()

{

    InitDocument();
    // 需把"'"转为"\'".
    Composition.document.body.innerHTML = oldContent ;

}


</script>

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

⌨️ 快捷键说明

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