|
@@ -32,7 +32,6 @@ import cn.com.qmth.examcloud.starters.crypto.common.CryptoGroup;
|
|
|
import cn.com.qmth.examcloud.starters.crypto.common.CryptoHelper;
|
|
|
import cn.com.qmth.examcloud.starters.crypto.common.FieldPair;
|
|
|
import cn.com.qmth.examcloud.starters.crypto.service.CryptoFactory;
|
|
|
-import cn.com.qmth.examcloud.support.CacheConstants;
|
|
|
import cn.com.qmth.examcloud.support.Constants;
|
|
|
import cn.com.qmth.examcloud.support.cache.CacheHelper;
|
|
|
import cn.com.qmth.examcloud.support.cache.bean.QuestionCacheBean;
|
|
@@ -305,15 +304,15 @@ public class ExamRecordQuestionsServiceImpl implements ExamRecordQuestionsServic
|
|
|
|
|
|
@Override
|
|
|
public void submitQuestionAnswer(Long studentId, List<ExamStudentQuestionInfo> examQuestionInfos, String referer, String agent, String ip, String fromBy) {
|
|
|
- if (log.isInfoEnabled()) {
|
|
|
- log.info("{} studentId:{} agent:{} referer:{}", fromBy, studentId, agent, referer);
|
|
|
- }
|
|
|
-
|
|
|
if (CollectionUtils.isEmpty(examQuestionInfos)) {
|
|
|
- log.warn("submitQuestionAnswer is empty. studentId = {} ", studentId);
|
|
|
+ log.warn("{} ip:{} AnswerContent is empty.", fromBy, ip);
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ if (log.isInfoEnabled()) {
|
|
|
+ log.info("{} ip:{} agent:{}", fromBy, ip, agent);
|
|
|
+ }
|
|
|
+
|
|
|
for (ExamStudentQuestionInfo examStudentQuestionInfo : examQuestionInfos) {
|
|
|
if (examStudentQuestionInfo.getOrder() == null) {
|
|
|
throw new StatusException("2001", "题目序号不能为空");
|
|
@@ -327,10 +326,10 @@ public class ExamRecordQuestionsServiceImpl implements ExamRecordQuestionsServic
|
|
|
long examRecordDataId = examSessionInfo.getExamRecordDataId();
|
|
|
|
|
|
if (StringUtils.isEmpty(referer) || StringUtils.isEmpty(agent) || !agent.contains(Constants.ELECTRON_EXAM_SHELL)) {
|
|
|
- String cacheKey = CacheConstants.CACHE_OE_DISCIPLINE_ILLEGAL_DATA + examSessionInfo.getExamRecordDataId();
|
|
|
- log.warn("非法数据:{} fromBy:{} agent:{} referer:{}", cacheKey, fromBy, agent, referer);
|
|
|
+ // String cacheKey = CacheConstants.CACHE_OE_DISCIPLINE_ILLEGAL_DATA + examSessionInfo.getExamRecordDataId();
|
|
|
// redisClient.set(cacheKey, true, OeConstants.TIME_OUT_1_DAY);
|
|
|
// 非法数据的作答记录,不再当有效作答记录保存,也不计入违纪
|
|
|
+ log.warn("$$$异常行为!{} ip:{} examRecordDataId:{} agent:{}", fromBy, ip, examRecordDataId, agent);
|
|
|
return;
|
|
|
}
|
|
|
|