Преглед на файлове

1.新增在线作业功能。
2.将网考中的考试类型枚举,统一改为调用公共模块中的枚举

lideyin преди 5 години
родител
ревизия
7f9265e4fc

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

@@ -373,7 +373,8 @@ public class ExamControlServiceImpl implements ExamControlService {
         }
 
         if ((!ExamType.ONLINE.name().equals(examSettingsCacheBean.getExamType()))
-                && (!ExamType.PRACTICE.name().equals(examSettingsCacheBean.getExamType()))) {
+                && (!ExamType.PRACTICE.name().equals(examSettingsCacheBean.getExamType()))
+                && (!ExamType.ONLINE_HOMEWORK.name().equals(examSettingsCacheBean.getExamType()))) {
             throw new StatusException("100019", "考试类型错误");
         }
 
@@ -1423,7 +1424,8 @@ public class ExamControlServiceImpl implements ExamControlService {
 
         Long examUsedMilliSeconds = cost * 1000;
         // 如果没有超过冻结时间,抛出异常
-        if (examingSession.getExamType().equals(ExamType.ONLINE.name())) {
+        if (ExamType.ONLINE.name().equals(examingSession.getExamType())
+                || ExamType.ONLINE_HOMEWORK.name().equals(examingSession.getExamType())) {
             ExamRecordData examRecordData = examRecordDataService
                     .getExamRecordDataCache(examingSession.getExamRecordDataId());
 

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

@@ -167,7 +167,8 @@ public class ExamRecordQuestionsServiceImpl implements ExamRecordQuestionsServic
             List<DefaultQuestionUnit> questionUnits = questionStructure.getQuestionUnitList();
 
             // 在线考试,清除答案
-            if (examSessionInfo.getExamType().equals(ExamType.ONLINE.name())) {
+            if (ExamType.ONLINE.name().equals(examSessionInfo.getExamType())
+                    || ExamType.ONLINE_HOMEWORK.name().equals(examSessionInfo.getExamType())) {
                 for (DefaultQuestionUnit questionUnit : questionUnits) {
                     questionUnit.setRightAnswer(null);
                 }