|
@@ -430,15 +430,19 @@ public class ExamControlServiceImpl implements ExamControlService {
|
|
|
private ExamBean checkExam(ExamStudentEntity examStudentEntity) {
|
|
|
|
|
|
// examStudentEntity.getOrgId());
|
|
|
- ExamBean examBean = ExamCacheTransferHelper.getCachedExam(examStudentEntity.getExamId(),
|
|
|
+
|
|
|
+ //通用考试配置
|
|
|
+ ExamBean examBean = ExamCacheTransferHelper.getCachedExam(examStudentEntity.getExamId());
|
|
|
+ //学习中心特殊考试配置(是否禁考,开考时间可以特殊设置)
|
|
|
+ ExamBean specialExamBean = ExamCacheTransferHelper.getCachedExam(examStudentEntity.getExamId(),
|
|
|
examStudentEntity.getOrgId());
|
|
|
- if (!examBean.getEnable() || (examBean.getExamLimit() != null && examBean.getExamLimit())) {
|
|
|
+ if (!examBean.getEnable() || (specialExamBean.getExamLimit() != null && specialExamBean.getExamLimit())) {
|
|
|
throw new StatusException("ExamControlServiceImpl-checkExam-exception-01", "暂无考试资格,请与学校老师联系");
|
|
|
}
|
|
|
- if (new Date().before(examBean.getBeginTime())) {
|
|
|
+ if (new Date().before(specialExamBean.getBeginTime())) {
|
|
|
throw new StatusException("ExamControlServiceImpl-checkExam-exception-02", "考试未开始");
|
|
|
}
|
|
|
- if (examBean.getEndTime().before(new Date())) {
|
|
|
+ if (specialExamBean.getEndTime().before(new Date())) {
|
|
|
throw new StatusException("ExamControlServiceImpl-checkExam-exception-03", "本次考试已结束");
|
|
|
}
|
|
|
if (ExamType.ONLINE.name().equals(examBean.getExamType())
|