|
@@ -380,7 +380,7 @@ public class ExamControlServiceImpl implements ExamControlService {
|
|
|
}
|
|
|
|
|
|
ExamSettingsCacheBean examSettingsCacheBean = ExamCacheTransferHelper.getCachedExam(examStudent.getExamId(),
|
|
|
- examStudent.getStudentId(),examStudent.getExamStageId());
|
|
|
+ examStudent.getStudentId(), examStudent.getExamStageId());
|
|
|
|
|
|
StudentCacheBean studentCacheBean = CacheHelper.getStudent(examStudent.getStudentId());
|
|
|
|
|
@@ -913,6 +913,26 @@ public class ExamControlServiceImpl implements ExamControlService {
|
|
|
return qrStr;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 记录切换屏幕次数
|
|
|
+ *
|
|
|
+ * @param examRecordDataId
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public void switchScreen(Long examRecordDataId) {
|
|
|
+ ExamRecordDataEntity examRecordDataEntity =
|
|
|
+ GlobalHelper.getEntity(examRecordDataRepo, examRecordDataId, ExamRecordDataEntity.class);
|
|
|
+ if (null == examRecordDataEntity) {
|
|
|
+ throw new StatusException("100001", "找不到相关考试记录");
|
|
|
+ }
|
|
|
+
|
|
|
+ //更新考试记录缓存
|
|
|
+ ExamRecordData examRecordData = examRecordDataService.getExamRecordDataCache(examRecordDataId);
|
|
|
+ int switchScreenCount = null == examRecordData.getSwitchScreenCount() ? 0 : examRecordData.getSwitchScreenCount();
|
|
|
+ examRecordData.setSwitchScreenCount(++switchScreenCount);
|
|
|
+ examRecordDataService.saveExamRecordDataCache(examRecordDataId, examRecordData);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* @param bucketName //不能为空
|
|
|
* @param expiration //不能为空
|
|
@@ -1004,7 +1024,7 @@ public class ExamControlServiceImpl implements ExamControlService {
|
|
|
private ExamSettingsCacheBean checkExam(Long examId, Long studentId, Long examStageId) {
|
|
|
|
|
|
// 学习中心特殊考试配置(是否禁考,开考时间可以特殊设置)
|
|
|
- ExamSettingsCacheBean examBean = ExamCacheTransferHelper.getCachedExam(examId, studentId,examStageId);
|
|
|
+ ExamSettingsCacheBean examBean = ExamCacheTransferHelper.getCachedExam(examId, studentId, examStageId);
|
|
|
|
|
|
// 如果启用了了特殊设置,并且无特殊设置时结束考试 配置 设置为true..且实际未设置特殊设置则不允许考试
|
|
|
ExamPropertyCacheBean limitedIfNoSpecialSettings = ExamCacheTransferHelper.getDefaultCachedExamProperty(examId,
|