📄 papercreate.jsp
字号:
<%@ page contentType="text/html;charset=GB2312" import="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 ExamType=ParamUtils.getIntParameter(request,"ExamType",0);
String MsgUrl="PaperList.jsp?ExamType="+ExamType;
//int PaperID=ParamUtils.getIntParameter(request,"PaperID",0);
Paper myPaper = new Paper();
PaperUser myPaperUser=new PaperUser();
PaperVolume myPaperVolume=new PaperVolume();
Type type=new Type();
//初始化数据
java.util.Calendar cal=java.util.Calendar.getInstance();
java.text.SimpleDateFormat d=new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
myPaper._CreateTime = myPaper._StartTime=d.format(cal.getTime());
cal.add(java.util.Calendar.DATE,7);
myPaper._EndTime=d.format(cal.getTime());
myPaper._Title = "在线"+Paper.getExamType(ExamType)+(myPaper.getPaperMaxID(ExamType)+1);
if(request.getMethod().compareTo("POST")==0){ //如果是提交
myPaper.getRequestInfor(request);
if(myPaper.Create()){
myPaperUser.getRequestInfor(request);
myPaperUser.setPaperUser(myPaper._PaperID);
myPaperVolume.getRequestInfor(request);
myPaperVolume.setInfor(myPaper._PaperID);
if(myPaper._IsRandom1==0){
myPaper.PaperCreate();
}
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>
<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();">
<%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" selected>固定</option>
<option value="1">随机</option>
</select>
<input type="checkbox" name="IsRandom2" value="1">
打乱考题显示顺序 </td>
<td nowrap rowspan="2">
<fieldset><legend align=TOP >时间限制</legend>
<input type="radio" name="chkTotalTime" onclick="createform.TotalTime.value='0';createform.TotalTime.readOnly=true;">
考试不计时<br>
<input type="radio" name="chkTotalTime" 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="60" 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="1" ONKEYPRESS="pressNumKey();" onchange="checkMyInt(1);">
最多考试次数
<input type="text" name="MaxTimes" class="input1" size="4" maxlength="6" value="1" 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" checked onclick="setSavaPaper(0);">
考试过程中不保存答卷<br>
<input type="radio" name="KsSavaPaper" value="1" onclick="setSavaPaper(1);">
考生手工保存答卷<br>
<input type="radio" name="KsSavaPaper" value="2" onclick="setSavaPaper(2);">
自动保存答卷,间隔
<input type="text" name="SaveCycle" class="input1" size="3" maxlength="2" value="10" ONKEYPRESS="pressNumKey();" onchange="checkMyInt(10);">
分钟(平均分布在时间间隔内保存) <br>
<input type="radio" name="KsSavaPaper" id="KsSavaPaper3" value="3" 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;}">
允许考试提交后查看答案和答卷 <br>
<input type="checkbox" name="ShowUserScore" value="1" checked>
允许考生查看成绩</td>
<td width="50%">
<input type="checkbox" name="ShowUserOrder" value="1" checked>
允许考生查看排名<br>
<input type="checkbox" name="ShowAllScore" value="1" 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" checked onclick="selPermitAll(1);">
</td>
<td>允许所有会员参加考试
<input type="checkbox" name="PermitGuest" value="0">
禁止guest帐号考试</td>
</tr>
<tr>
<td nowrap width="10">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -