|
@@ -1,6 +1,7 @@
|
|
|
package cn.com.qmth.examcloud.core.oe.admin.service.impl;
|
|
|
|
|
|
import cn.com.qmth.examcloud.api.commons.enums.ExamType;
|
|
|
+import cn.com.qmth.examcloud.commons.helpers.QuestionOptionHelper;
|
|
|
import cn.com.qmth.examcloud.core.oe.admin.dao.*;
|
|
|
import cn.com.qmth.examcloud.core.oe.admin.dao.entity.*;
|
|
|
import cn.com.qmth.examcloud.core.oe.admin.service.ExamRecordQuestionsService;
|
|
@@ -17,7 +18,6 @@ import cn.com.qmth.examcloud.support.cache.bean.CourseCacheBean;
|
|
|
import cn.com.qmth.examcloud.support.cache.bean.ExtractConfigPaperCacheBean;
|
|
|
import cn.com.qmth.examcloud.support.cache.bean.QuestionAnswerCacheBean;
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
-import org.apache.commons.lang3.StringUtils;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -170,8 +170,7 @@ public class FixExamScoreServiceImpl implements FixExamScoreService {
|
|
|
// 计算得分
|
|
|
String correctAnswer = curQuestion.getCorrectAnswer();
|
|
|
String studentAnswer = curQuestion.getStudentAnswer();
|
|
|
- // if (StringUtils.isNotEmpty(studentAnswer) && QuestionOptionHelper.isEqualAnswer(correctAnswer, studentAnswer)) {
|
|
|
- if (StringUtils.isNotEmpty(studentAnswer) && studentAnswer.equals(correctAnswer)) {
|
|
|
+ if (QuestionOptionHelper.isEqualAnswer(correctAnswer, studentAnswer)) {
|
|
|
if (curQuestion.getQuestionScore() == null) {
|
|
|
curQuestion.setQuestionScore(0d);
|
|
|
}
|