📄 paperitemupdate.jsp
字号:
<%@ page contentType="text/html;charset=GB2312" import="net.xerllent.campus.database.*,net.xerllent.campus.util.*,net.xerllent.campus.exam.*,net.xerllent.campus.sysadmin.*" %>
<%
int MsgType=0;
String MsgStr="";
int ItemID = ParamUtils.getIntParameter(request,"ItemID",0);
if(ItemID==0){
response.sendRedirect("/prog/nopermission.jsp");
}
Item myItem = new Item(ItemID);
Type myType=new Type(myItem._TypeID);
String MsgUrl="PaperItemList.jsp?PaperID="+myItem._PaperID;
if(request.getMethod().compareTo("POST")==0){ //如果是提交
myItem.tempImageFolder=application.getRealPath("/files/Exam/");
myItem.getRequestInfor(request);
if(myItem.Update()){
response.sendRedirect(MsgUrl);
}else{
MsgType=1;
MsgStr="数据重复,或其他原因!\n不能保存结果!";
}
}
String[] Options=myItem._Selection.split(";");
%>
<html>
<head>
<title>Xerllent.NET</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script src="/prog/jscript/floatPanel.js"></script>
<script src="/prog/jscript/DoneMSG.js"></script>
<script src="/prog/jscript/string.js"></script>
<script src="/prog/jscript/ExamItemModify.js"></script>
<script language="javascript">
<!--
var selTypeID=<%=myItem._TypeID%>;
-->
</script>
<link rel="stylesheet" href="/prog/images/campus.css" type="text/css">
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" onload="popDlg();ShowType();">
<%net.xerllent.campus.util.dialogMsg.getDlgValue(MsgType,MsgStr,MsgUrl,out);%>
<table width="100%" height="22" border="0" cellspacing="0" cellpadding="0">
<tr>
<td ></td>
</tr>
</table>
<DIV id=floater style="LEFT: 0px; TOP: 0px">
<table width="100%" class="gl_mainBar" height="22" border="0" cellspacing="0" cellpadding="0">
<tr>
<td nowrap>【在线考试系统-试卷-修改题目】 </td>
<td align="right" nowrap >
<input type="button" name="frmSubmit" value="确 定" class="button1" onClick="if(checkcreate()) createform.submit();">
<input type="button" name="Cancel" value="取 消" class="button1" onclick="window.location='<%=MsgUrl%>';">
</td>
<td width="10"> </td>
</tr>
</table>
</DIV>
<table width="95%" border="0" cellspacing="0" cellpadding="0" align="center" class="f90">
<tr>
<td align="right" nowrap> </td>
</tr>
</table>
<table width="95%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td nowrap width="80" class="lbcolor" id="lable1a">修改题目</td>
<td nowrap width="7"><img id="lable1b" src="/prog/images/triangle.gif" ></td>
<td nowrap> </td>
</tr>
<tr>
<td class="lbcolor" nowrap colspan="13"> </td>
</tr>
</table>
<table width="95%" border="0" cellspacing="0" cellpadding="10" align="center" class="gl_tdbox">
<tr>
<td valign="top">
<form name="createform" method="post" action="PaperItemUpdate.jsp?ItemID=<%=myItem._ItemID%>">
<table id="Table_1" width="100%" border="0" cellspacing="0" cellpadding="0" class="f90">
<tr>
<td><fieldset > <legend> 题目内容</legend>
<table width="100%" border="0" cellspacing="0" cellpadding="2" class="f90">
<tr>
<td width="60" align="right" height="20" nowrap>所在位置:</td>
<td> <%=new Paper(myItem._PaperID)._Title%></td>
</tr>
<tr>
<td align="right">知识点:</td>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="f90">
<tr>
<td>
<input type="text" name="Knowledge" class="input1" value="<%=myItem._Knowledge%>" readOnly>
</td>
<td align="right" nowrap >题分
<input type="text" name="Score" size="3" maxlength="4" class="input1" value="<%=myItem._Score%>">
难度
<select name="Hard" class="select1">
<option value="1" <%if(myItem._Hard==1){out.print("selected");}%>>1</option>
<option value="2" <%if(myItem._Hard==2){out.print("selected");}%>>2</option>
<option value="3" <%if(myItem._Hard==3){out.print("selected");}%>>3</option>
<option value="4" <%if(myItem._Hard==4){out.print("selected");}%>>4</option>
<option value="5" <%if(myItem._Hard==5){out.print("selected");}%>>5</option>
</select>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="right" height="25">题型:</td>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="f90">
<tr>
<td nowrap>
<input type="radio" name="TypeID" id="TypeID1" value="1" onclick="setType(1);" <%if(myItem._TypeID==1){out.print("checked");}%>>
<label for="TypeID1">填空 </label>
<input type="radio" name="TypeID" id="TypeID2" value="2" onclick="setType(2);" <%if(myItem._TypeID==2){out.print("checked");}%>>
<label for="TypeID2">单选 </label>
<input type="radio" name="TypeID" id="TypeID3" value="3" onclick="setType(3);" <%if(myItem._TypeID==3){out.print("checked");}%>>
<label for="TypeID3">多选 </label>
<input type="radio" name="TypeID" id="TypeID4" value="4" onclick="setType(4);" <%if(myItem._TypeID==4){out.print("checked");}%>>
<label for="TypeID4">判断 </label>
<input type="radio" name="TypeID" id="TypeID5" value="5" onclick="setType(5);" <%if(myItem._TypeID==5){out.print("checked");}%>>
<label for="TypeID5">计算 </label>
<input type="radio" name="TypeID" id="TypeID6" value="6" onclick="setType(6);" <%if(myItem._TypeID==6){out.print("checked");}%>>
<label for="TypeID6">问答</label> </td>
<td align="right" nowrap id=selCountTD>项数
<select name="SelCount" class="select1" onchange="ShowType();">
<option value="2" <%if(myItem._SelCount==2){out.print("selected");}%>>2</option>
<option value="3" <%if(myItem._SelCount==3){out.print("selected");}%>>3</option>
<option value="4" <%if(myItem._SelCount==4){out.print("selected");}%>>4</option>
<option value="5" <%if(myItem._SelCount==5){out.print("selected");}%>>5</option>
<option value="6" <%if(myItem._SelCount==6){out.print("selected");}%>>6</option>
</select>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="right">内容:</td>
<td>
<textarea name="Content" class="input1" cols="40" rows="5" style="width:100%"><%=myItem._Content%></textarea>
</td>
</tr>
<tr id="Table2" style="display:none">
<td align="right">单选选项:</td>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0" >
<tr id="Table2_1">
<td width="10">
<input type="radio" name="Ans2" id="Ans2_1" value="A" <%if(myItem._TypeID==2){if(myItem._Answer.equals("A")){out.print("checked");}}%>>
</td>
<td>
<input type="text" name="Opt2_1" class="input1" style="width:95%" value="<%if(myItem._TypeID==2){if(Options.length>0){out.print(Options[0]);}}%>">
</td>
</tr>
<tr id="Table2_2">
<td>
<input type="radio" name="Ans2" id="Ans2_2" value="B" <%if(myItem._TypeID==2){if(myItem._Answer.equals("B")){out.print("checked");}}%>>
</td>
<td>
<input type="text" name="Opt2_2" class="input1" style="width:95%" value="<%if(myItem._TypeID==2){if(Options.length>1){out.print(Options[1]);}}%>">
</td>
</tr>
<tr id="Table2_3" style="display:none">
<td>
<input type="radio" name="Ans2" id="Ans2_3" value="C" <%if(myItem._TypeID==2){if(myItem._Answer.equals("C")){out.print("checked");}}%>>
</td>
<td>
<input type="text" name="Opt2_3" class="input1" style="width:95%" value="<%if(myItem._TypeID==2){if(Options.length>2){out.print(Options[2]);}}%>">
</td>
</tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -