📄 paperupdate.jsp
字号:
<%@ page contentType="text/html;charset=GB2312" import="java.util.*,net.xerllent.campus.database.*,net.xerllent.campus.util.*,net.xerllent.campus.exam.*,net.xerllent.campus.sysadmin.*" %>
<%
//静态权限认证
security.checkAuth(session,"",response,request);
%>
<%
int MsgType=0;
String MsgStr="";
int UserID=((Integer)session.getAttribute("UserID")).intValue();
int PaperID=ParamUtils.getIntParameter(request,"PaperID",0);
//int ExamType=ParamUtils.getIntParameter(request,"ExamType",0);
Paper myPaper = new Paper(PaperID);
String MsgUrl="PaperList.jsp?ExamType="+myPaper._ExamType;
PaperUser myPaperUser=new PaperUser(myPaper._PaperID);
PaperVolume myPaperVolume=new PaperVolume(myPaper._PaperID);
Type type=new Type();
if(request.getMethod().compareTo("POST")==0){ //如果是提交
int Reset=ParamUtils.getIntParameter(request,"Reset",0);
myPaper.getRequestInfor(request);
if(myPaper.Update()){
myPaperUser.getRequestInfor(request);
myPaperUser.setPaperUser(myPaper._PaperID);
if(Reset>0){//重组试卷
myPaperVolume=new PaperVolume();//必须初始化
myPaperVolume.getRequestInfor(request);
myPaperVolume.setInfor(myPaper._PaperID);
Score.DeletePaper(myPaper._PaperID);//删考试记录
if(myPaper._IsRandom1==0){
Item.DeletePaperItems(myPaper._PaperID);//删试卷原题记录
myPaper.PaperCreate();
}
}else{//不重组试卷,修改固定试卷题分,已考试卷还没改分办法
Item myItem = new Item();
if(myPaper._isLimitScore==0){
myItem.AlterItemScore(myPaper._PaperID,myPaper._FullScore);
}else{
myItem.AlterItemScore(myPaper);
}
}
response.sendRedirect(MsgUrl);
}else{
MsgType=1;
MsgStr="数据重复,或其他原因!\n不能保存结果!";
}
}
%>
<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/selector.js"></SCRIPT>
<SCRIPT src="/prog/jscript/label.js"></SCRIPT>
<script src="/prog/jscript/string.js"></script>
<script src="/prog/jscript/DoneMSG.js"></script>
<script src="/prog/jscript/ExamPaper.js"></script>
<SCRIPT src="" ID=PaperScript></SCRIPT>
<script language=javascript>
<!--
function onModifyVol(){
if(createform.Reset.value==0){
if(confirm("修改试卷题型参数必须重新组卷!!\n系统将会先删除以前所有该试卷的考试记录。您要继续吗?")){
createform.Reset.value=1;
event.returnValue=false;
var i;
for(i=1;i<9;i++){
chkToggle(i);
}
return true;
}else{
event.returnValue=false;
return false;
}
}
return true;
}
-->
</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();checkNum();">
<%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" onclick="javascript:changestyle(1);">基本信息</td>
<td nowrap width="7"><img id="lable1b" src="/prog/images/triangle.gif" ></td>
<td nowrap width="80" class="lbcolor1" id="lable2a" onclick="javascript:changestyle(2);">试卷策略</td>
<td nowrap width="7"><img id="lable2b" src="/prog/images/triangle1.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 height="241" valign="top">
<form name="createform" method="post" action="" class="form">
<table id="Table_1" width="100%" border="0" cellspacing="0" cellpadding="0" class="f90">
<tr>
<td><fieldset><legend>基本信息</legend>
<table width="100%" border="0" class="f90">
<tr>
<td width="75" align="right" nowrap>出卷人</td>
<td><%=User.getUserTrueName(UserID)%></td>
<td width="50%" nowrap>出卷时间 <%=myPaper._CreateTime%></td>
</tr>
<tr>
<td align="right" nowrap>试卷名称</td>
<td colspan="2">
<input type="text" name="Title" class="input1" size="60" value="<%=myPaper._Title%>">
</td>
</tr>
<tr>
<td align="right" nowrap>出题方式</td>
<td nowrap>
<select name="IsRandom1" class="f90" onclick="selRandom1();">
<option value="0" <%if(myPaper._IsRandom1==0){out.print("selected");}%>>固定</option>
<option value="1" <%if(myPaper._IsRandom1==1){out.print("selected");}%>>随机</option>
</select>
<input type="checkbox" name="IsRandom2" value="1" <%if(myPaper._IsRandom1==0)if(myPaper._IsRandom2==0){out.print("selected");}%>>
打乱考题显示顺序 </td>
<td nowrap rowspan="2">
<fieldset><legend align=TOP >时间限制</legend>
<input type="radio" name="chkTotalTime" onclick="createform.TotalTime.value='0';createform.TotalTime.readOnly=true;" <%if(myPaper._TotalTime==0)out.print("checked");%>>
考试不计时<br>
<input type="radio" name="chkTotalTime" <%if(myPaper._TotalTime>0)out.print("checked");%> onclick="if(createform.TotalTime.value==0)createform.TotalTime.value='60';createform.TotalTime.readOnly=false;">
答题时间
<input type="text" name="TotalTime" class="input1" size="4" value="<%=myPaper._TotalTime%>" maxlength="4" ONKEYPRESS="pressNumKey();" onchange="checkMyInt(60);">
分钟 </fieldset></td>
</tr>
<tr>
<td align="right" nowrap>至少考试次数</td>
<td nowrap>
<input type="text" name="MinTimes" class="input1" size="4" maxlength="6" value="<%=myPaper._MinTimes%>" ONKEYPRESS="pressNumKey();" onchange="checkMyInt(1);">
最多考试次数
<input type="text" name="MaxTimes" class="input1" size="4" maxlength="6" value="<%=myPaper._MaxTimes%>" ONKEYPRESS="pressNumKey();" onchange="checkMyInt(1);">
</td>
</tr>
</table>
</fieldset><fieldset><legend align=TOP > 有效考试时间段</legend>
<table width="100%" border="0" class="f90">
<tr>
<td align="right" nowrap width="75">开始时间</td>
<td>
<input type="text" name="StartTime" class="input1" value="<%=myPaper._StartTime%>" onchange="checkMyDate();">
</td>
<td width="50%" nowrap>结束时间
<input type="text" name="EndTime" class="input1" value="<%=myPaper._EndTime%>" onchange="checkMyDate();">
</td>
</tr>
</table>
</fieldset>
<fieldset><legend align=TOP > 答卷保存设置</legend>
<table width="100%" border="0" class="f90">
<tr>
<td nowrap>
<input type="radio" name="KsSavaPaper" value="0" <%if(myPaper._KsSavaPaper==0)out.print("checked");%> onclick="setSavaPaper(0);">
考试过程中不保存答卷<br>
<input type="radio" name="KsSavaPaper" value="1" <%if(myPaper._KsSavaPaper==1)out.print("checked");%> onclick="setSavaPaper(1);">
考生手工保存答卷<br>
<input type="radio" name="KsSavaPaper" value="2" <%if(myPaper._KsSavaPaper==2)out.print("checked");%> onclick="setSavaPaper(2);">
自动保存答卷,间隔
<input type="text" name="SaveCycle" class="input1" size="3" maxlength="2" value="<%=myPaper._SaveCycle%>" ONKEYPRESS="pressNumKey();" onchange="checkMyInt(10);">
分钟(平均分布在时间间隔内保存) <br>
<input type="radio" name="KsSavaPaper" id="KsSavaPaper3" value="<%if(myPaper._KsSavaPaper==3)out.print("checked");%>" onclick="setSavaPaper(3);">
提交时不保存答卷记录(仅记录成绩,不保存答卷记录,不允许出主观题) </td>
</tr>
</table>
</fieldset> <fieldset><legend align=TOP > 成绩选项</legend>
<table width="100%" border="0" class="f90" cellpadding="0" cellspacing="0">
<tr>
<td nowrap width="50%">
<input type="checkbox" name="ShowUserResult" value="1" onclick="if(document.all.KsSavaPaper3.checked){createform.ShowUserResult.checked=true;}" <%if(myPaper._ShowUserResult==1)out.print("checked");%>>
允许考试提交后查看答案和答卷 <br>
<input type="checkbox" name="ShowUserScore" value="1" <%if(myPaper._ShowUserScore==1)out.print("checked");%>>
允许考生查看成绩</td>
<td width="50%">
<input type="checkbox" name="ShowUserOrder" value="1" <%if(myPaper._ShowUserOrder==1)out.print("checked");%>>
允许考生查看排名<br>
<input type="checkbox" name="ShowAllScore" value="1" <%if(myPaper._ShowAllScore==1)out.print("checked");%>>
对所有人公布成绩(包括排行)</td>
</tr>
</table>
</fieldset><fieldset><legend align=TOP > 考生及阅卷人</legend>
<table width="100%" border="0" class="f90" cellpadding="0" cellspacing="0">
<tr>
<td nowrap width="50%">
<table width="100%" border="0" class="f90" cellpadding="0" cellspacing="0">
<tr>
<td nowrap width="10">
<input type="radio" name="PermitAll" value="1" <%if(myPaper._PermitAll==1)out.print("checked");%> onclick="selPermitAll(1);">
</td>
<td>允许所有会员参加考试
<input type="checkbox" name="PermitGuest" value="0" <%if(myPaper._PermitGuest==0)out.print("checked");%>>
禁止guest帐号考试</td>
</tr>
<tr>
<td nowrap width="10">
<input type="radio" name="PermitAll" value="0" onclick="selPermitAll(0);" <%if(myPaper._PermitAll==0)out.print("checked");%>>
</td>
<td>
<input type="button" name="bnMember" value="选择考生" class="button1" onclick="getPaperUser(1);" <%if(myPaper._PermitAll==1)out.print("disabled");%>>
<input type="text" name="Members" class="input1" size="60" disabled value="<%=myPaperUser.getMemberNames()%>">
<input type="hidden" name="selMember" value="<%=myPaperUser.getMemberIDs()%>">
</td>
</tr>
<tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -