xiatian 4 년 전
부모
커밋
e5de59768f
1개의 변경된 파일8개의 추가작업 그리고 4개의 파일을 삭제
  1. 8 4
      src/main/java/cn/com/qmth/examcloud/app/service/impl/CoreOeServiceImpl.java

+ 8 - 4
src/main/java/cn/com/qmth/examcloud/app/service/impl/CoreOeServiceImpl.java

@@ -19,6 +19,7 @@ import cn.com.qmth.examcloud.app.model.Constants;
 import cn.com.qmth.examcloud.app.model.GetYunSignatureReq;
 import cn.com.qmth.examcloud.app.model.Result;
 import cn.com.qmth.examcloud.app.service.CoreOeService;
+import cn.com.qmth.examcloud.api.commons.enums.ExamType;
 import cn.com.qmth.examcloud.app.core.SysProperty;
 import okhttp3.FormBody;
 import okhttp3.FormBody.Builder;
@@ -189,10 +190,13 @@ public class CoreOeServiceImpl implements CoreOeService {
 	        	if(bdata!=null) {
 		        	Long examId=bdata.getLong("examId");
 		        	if(examId!=null) {
-		        		ExamPropertyCacheBean es=CacheHelper.getExamProperty(examId, ExamProperties.APP_EXAM_ENABLED.name());
-		        		if(!"true".equals(es.getValue())) {
-		        			ret.setCode(Constants.CODE_409);
-		        			ret.setDesc(Constants.DESC_409);
+		        		ExamSettingsCacheBean exam=CacheHelper.getExamSettings(examId);
+		        		if(ExamType.ONLINE.name().equals(exam.getExamType())) {
+			        		ExamPropertyCacheBean es=CacheHelper.getExamProperty(examId, ExamProperties.APP_EXAM_ENABLED.name());
+			        		if(!"true".equals(es.getValue())) {
+			        			ret.setCode(Constants.CODE_409);
+			        			ret.setDesc(Constants.DESC_409);
+			        		}
 		        		}
 		        	}
 	        	}