ting.yin 5 年之前
父節點
當前提交
1c5b41589b

+ 3 - 0
stmms-web/src/main/java/cn/com/qmth/stmms/admin/exam/ExamController.java

@@ -113,6 +113,9 @@ public class ExamController extends BaseExamController {
         exam.setSchoolId(user.getSchoolId());
         exam.setSchoolId(user.getSchoolId());
         exam.setCreatorId(user.getId());
         exam.setCreatorId(user.getId());
         exam.setStatus(ExamStatus.START);
         exam.setStatus(ExamStatus.START);
+        if (exam.getType().equals(ExamType.MULTI_MEDIA)) {
+            exam.setForceSpecialTag(false);
+        }
         exam = examService.save(exam);
         exam = examService.save(exam);
         addMessage(redirectAttributes, "创建考试'" + exam.getName() + "'成功");
         addMessage(redirectAttributes, "创建考试'" + exam.getName() + "'成功");
         return "redirect:/admin/exam-list";
         return "redirect:/admin/exam-list";

+ 3 - 1
stmms-web/src/main/webapp/WEB-INF/views/modules/exam/examEdit.jsp

@@ -45,7 +45,7 @@
 		<div class="control-group">
 		<div class="control-group">
 			<label class="control-label">类型</label>
 			<label class="control-label">类型</label>
 			<div class="controls">
 			<div class="controls">
-				<select class="input-small" name="type" disabled="disabled">
+				<select class="input-small" name="type" disabled="disabled" id="examType">
                 	 <option value="${exam.type.value}">${exam.type.name}</option>
                 	 <option value="${exam.type.value}">${exam.type.name}</option>
             	</select>
             	</select>
 			</div>
 			</div>
@@ -58,12 +58,14 @@
 					onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
 					onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
 			</div>
 			</div>
 		</div>
 		</div>
+		<c:if test="${exam.type!='MULTI_MEDIA'}">
 		<div class="control-group">
 		<div class="control-group">
 			<label class="control-label">强制标记</label>
 			<label class="control-label">强制标记</label>
 			<div class="controls">
 			<div class="controls">
 				<input name="forceSpecialTag" type="checkbox" <c:if test="${exam.forceSpecialTag}">checked</c:if>/>
 				<input name="forceSpecialTag" type="checkbox" <c:if test="${exam.forceSpecialTag}">checked</c:if>/>
 			</div>
 			</div>
 		</div>
 		</div>
+		</c:if>
 		<div class="control-group">
 		<div class="control-group">
 			<label class="control-label">及格分</label>
 			<label class="control-label">及格分</label>
 			<div class="controls">
 			<div class="controls">

+ 10 - 1
stmms-web/src/main/webapp/WEB-INF/views/modules/exam/examForm.jsp

@@ -23,6 +23,13 @@
 					}
 					}
 				}
 				}
 			});
 			});
+			$("#examType").change(function() { 
+				if ($("#examType").val()=='2'){
+					$("#forceSpecialTagDiv").hide();
+				}else{
+					$("#forceSpecialTagDiv").show();
+				}
+			});
 		});
 		});
 	</script>
 	</script>
 </head>
 </head>
@@ -42,7 +49,7 @@
 		<div class="control-group">
 		<div class="control-group">
 			<label class="control-label">类型</label>
 			<label class="control-label">类型</label>
 			<div class="controls">
 			<div class="controls">
-				<select class="input-small" name="type">
+				<select class="input-small" name="type" id="examType">
                 <c:forEach items="${typeList}" var="item">
                 <c:forEach items="${typeList}" var="item">
                 	 <option value="${item.value}" <c:if test="${item.value==exam.type.value}">selected</c:if>>${item.name}</option>
                 	 <option value="${item.value}" <c:if test="${item.value==exam.type.value}">selected</c:if>>${item.name}</option>
                 </c:forEach>
                 </c:forEach>
@@ -57,12 +64,14 @@
 					onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
 					onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
 			</div>
 			</div>
 		</div>
 		</div>
+		<div id="forceSpecialTagDiv">
 		<div class="control-group">
 		<div class="control-group">
 			<label class="control-label">强制标记</label>
 			<label class="control-label">强制标记</label>
 			<div class="controls">
 			<div class="controls">
 				<input name="forceSpecialTag" type="checkbox" <c:if test="${exam.forceSpecialTag}">checked</c:if>/>
 				<input name="forceSpecialTag" type="checkbox" <c:if test="${exam.forceSpecialTag}">checked</c:if>/>
 			</div>
 			</div>
 		</div>
 		</div>
+		</div>
 		<div class="control-group">
 		<div class="control-group">
 			<label class="control-label">及格分</label>
 			<label class="control-label">及格分</label>
 			<div class="controls">
 			<div class="controls">

+ 2 - 0
stmms-web/src/main/webapp/WEB-INF/views/modules/exam/groupAdd.jsp

@@ -134,12 +134,14 @@
             </div>
             </div>
         </div>
         </div>
         </div>
         </div>
+        <c:if test="${examType!='MULTI_MEDIA'}">
 		<div class="control-group">
 		<div class="control-group">
 			<label class="control-label">原卷显示</label>
 			<label class="control-label">原卷显示</label>
 			<div class="controls">
 			<div class="controls">
 				<input name="sheetView" type="checkbox" <c:if test="${group.sheetView}">checked</c:if>/>
 				<input name="sheetView" type="checkbox" <c:if test="${group.sheetView}">checked</c:if>/>
 			</div>
 			</div>
 		</div>
 		</div>
+		</c:if>
         <div class="form-actions">
         <div class="form-actions">
             <a id="btnSubmit" href="##" class="btn btn-primary">保 存</a>&nbsp;
             <a id="btnSubmit" href="##" class="btn btn-primary">保 存</a>&nbsp;
             <a href="${ctx}/admin/exam/group?subjectCode=${group.subjectCode}" class="btn">返回</a>
             <a href="${ctx}/admin/exam/group?subjectCode=${group.subjectCode}" class="btn">返回</a>

+ 2 - 0
stmms-web/src/main/webapp/WEB-INF/views/modules/exam/groupEditFull.jsp

@@ -157,12 +157,14 @@
             </div>
             </div>
         </div>
         </div>
         </div>
         </div>
+        <c:if test="${examType!='MULTI_MEDIA'}">
  		<div class="control-group">
  		<div class="control-group">
 			<label class="control-label">原卷显示</label>
 			<label class="control-label">原卷显示</label>
 			<div class="controls">
 			<div class="controls">
 				<input name="sheetView" type="checkbox" <c:if test="${group.sheetView}">checked</c:if>/>
 				<input name="sheetView" type="checkbox" <c:if test="${group.sheetView}">checked</c:if>/>
 			</div>
 			</div>
 		</div>
 		</div>
+		</c:if>
         <div class="control-group">
         <div class="control-group">
             <label class="control-label">重要提示</label>
             <label class="control-label">重要提示</label>
             <div class="controls">
             <div class="controls">

+ 2 - 0
stmms-web/src/main/webapp/WEB-INF/views/modules/exam/groupEditSimple.jsp

@@ -126,12 +126,14 @@
 <!--             </div> -->
 <!--             </div> -->
 <!--         </div> -->
 <!--         </div> -->
 <!--         </div> -->
 <!--         </div> -->
+		<c:if test="${examType!='MULTI_MEDIA'}">
 		<div class="control-group">
 		<div class="control-group">
 			<label class="control-label">原卷显示</label>
 			<label class="control-label">原卷显示</label>
 			<div class="controls">
 			<div class="controls">
 				<input name="sheetView" type="checkbox" <c:if test="${group.sheetView}">checked</c:if>/>
 				<input name="sheetView" type="checkbox" <c:if test="${group.sheetView}">checked</c:if>/>
 			</div>
 			</div>
 		</div>
 		</div>
+		</c:if>
         <div class="form-actions">
         <div class="form-actions">
             <a id="btnSubmit" href="##" class="btn btn-primary">保 存</a>&nbsp;
             <a id="btnSubmit" href="##" class="btn btn-primary">保 存</a>&nbsp;
             <a href="${ctx}/admin/exam/group?subjectCode=${group.subjectCode}" class="btn">返回</a>
             <a href="${ctx}/admin/exam/group?subjectCode=${group.subjectCode}" class="btn">返回</a>