|
@@ -16,6 +16,7 @@ import cn.com.qmth.examcloud.core.oe.admin.api.response.QueryExamRecordForSelect
|
|
import cn.com.qmth.examcloud.core.oe.admin.service.ExamRecordForMarkingService;
|
|
import cn.com.qmth.examcloud.core.oe.admin.service.ExamRecordForMarkingService;
|
|
import cn.com.qmth.examcloud.core.oe.common.base.utils.Check;
|
|
import cn.com.qmth.examcloud.core.oe.common.base.utils.Check;
|
|
import cn.com.qmth.examcloud.core.oe.common.entity.*;
|
|
import cn.com.qmth.examcloud.core.oe.common.entity.*;
|
|
|
|
+import cn.com.qmth.examcloud.core.oe.common.helper.ExamCacheTransferHelper;
|
|
import cn.com.qmth.examcloud.core.oe.common.repository.*;
|
|
import cn.com.qmth.examcloud.core.oe.common.repository.*;
|
|
import cn.com.qmth.examcloud.question.commons.core.question.AnswerType;
|
|
import cn.com.qmth.examcloud.question.commons.core.question.AnswerType;
|
|
import cn.com.qmth.examcloud.question.commons.core.question.QuestionType;
|
|
import cn.com.qmth.examcloud.question.commons.core.question.QuestionType;
|
|
@@ -281,17 +282,11 @@ public class ExamRecordCloudServiceProvider extends ControllerSupport implements
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
private String transformedAnswerType(AnswerType answerType, QuestionType questionType, Long examId) {
|
|
private String transformedAnswerType(AnswerType answerType, QuestionType questionType, Long examId) {
|
|
- //需要图片作答的考试id(以英文逗号分隔)
|
|
|
|
- Object oExamId = CacheHelper.getSysProperty("oe.imgAnswer.examId").getValue();
|
|
|
|
- if (null != oExamId) {
|
|
|
|
- String strExamId = String.valueOf(oExamId);
|
|
|
|
- List<String> examIdList = Arrays.asList(strExamId.split(","));
|
|
|
|
- //如果题型为问答题,且作答类型不为音频作答,且考试为需要图片作答,则此题为图片作答题
|
|
|
|
- if (questionType == QuestionType.ESSAY &&
|
|
|
|
- (null == answerType || (null != answerType && answerType != AnswerType.SINGLE_AUDIO))) {
|
|
|
|
- if (examIdList.stream().anyMatch(eid -> eid.equals(String.valueOf(examId)))) {
|
|
|
|
- return "image";
|
|
|
|
- }
|
|
|
|
|
|
+ //如果题型为问答题,且作答类型不为音频作答,且开启微信作答,则此题为图片作答题
|
|
|
|
+ if (questionType == QuestionType.ESSAY &&
|
|
|
|
+ (null == answerType || (null != answerType && answerType != AnswerType.SINGLE_AUDIO))) {
|
|
|
|
+ if (ExamCacheTransferHelper.weixinAnswerEnabled(examId)) {
|
|
|
|
+ return "image";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|