Browse Source

交卷冻结时间bug

xiatian 4 years ago
parent
commit
ff08002f18

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

@@ -1820,10 +1820,10 @@ public class ExamControlServiceImpl implements ExamControlService {
         //交卷时重新计算考试已用时间
         Long examUsedMilliSeconds = calcUsedExamSeconds(studentId) * 1000;
         //考试总时长
-        long examTotalMilliSeconds = calcExamTotalMilliSeconds(examingSession.getExamRecordDataId());
-        //如果开启场次,并且设置了定点交卷,且考试时间已经用完,则不需要校验冻结时间,直接返回考试时长
+//        long examTotalMilliSeconds = calcExamTotalMilliSeconds(examingSession.getExamRecordDataId());
+        //如果开启场次,并且设置了定点交卷,且已到定点收卷时间,则不需要校验冻结时间,直接返回考试时长
         if (isTimingEnd(examingSession.getExamId(), studentId, examingSession.getExamStageId())
-                && examUsedMilliSeconds >= examTotalMilliSeconds) {
+                && examingSession.getFixedSubmitTime().getTime()<=new Date().getTime()) {
             return examUsedMilliSeconds;
         }