xiatian 1 год назад
Родитель
Сommit
cfdcdee2de

+ 2 - 1
examcloud-core-oe-student-service/src/main/java/cn/com/qmth/examcloud/core/oe/student/service/impl/ExamControlServiceImpl.java

@@ -696,6 +696,7 @@ public class ExamControlServiceImpl implements ExamControlService {
                 || (examSettingsCacheBean.getExamLimit() != null && examSettingsCacheBean.getExamLimit())) {
             throw new StatusException("100016", "暂无考试资格,请与学校老师联系");
         }
+        examingSession = new ExamingSession();
         ExamPropertyCacheBean examCycleEnabledCache = CacheHelper.getExamProperty(examId, ExamProperties.EXAM_CYCLE_ENABLED.name());
         if (examCycleEnabledCache != null && StringUtil.isTrue(examCycleEnabledCache.getValue())) {//设置周期的只校验周期
             checkExamCycle(examingSession,examId);
@@ -735,7 +736,7 @@ public class ExamControlServiceImpl implements ExamControlService {
             throw new StatusException("100021", "无剩余考试次数");
         }
 
-        examingSession = new ExamingSession();
+
         examingSession.setCourseCode(courseCacheBean.getCode());
         examingSession.setCourseId(courseCacheBean.getId());
         examingSession.setCreationTime(new Date());