|
|
|
@ -153,6 +153,16 @@ public class ObjectiveQuestionServiceImpl implements ObjectiveQuestionService {
|
|
|
|
|
ObjectiveQuestionWithBLOBs dataObjectiveQuestion = objectiveQuestionMapper.selectByPrimaryKey(dtoObjectiveId);
|
|
|
|
|
String rightAnswer = dataObjectiveQuestion.getAnswer();
|
|
|
|
|
String stuAnswer = objectiveQuestionDto.getUserAnswer();
|
|
|
|
|
|
|
|
|
|
//判断题 前端传A/B 单独处理
|
|
|
|
|
if (dataObjectiveQuestion.getType().equals(2)) {
|
|
|
|
|
if (rightAnswer.contains("错")) {
|
|
|
|
|
rightAnswer = "B";
|
|
|
|
|
}
|
|
|
|
|
if (rightAnswer.equals("正确") || rightAnswer.equals("对")) {
|
|
|
|
|
rightAnswer = "A";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (!rightAnswer.equals(stuAnswer)) {
|
|
|
|
|
count += 1;
|
|
|
|
|
}
|
|
|
|
|