|
@@ -1428,6 +1428,11 @@ public class ImportPaperFromJsonService {
|
|
|
private void checkSelectAnswer(Question question, String answerWord, ImportPaperCheck importPaperCheck,
|
|
|
int subQuesNum) throws PaperException {
|
|
|
if (!StringUtils.isBlank(answerWord)) {
|
|
|
+ if (question.getQuestionType() == QuesStructType.SINGLE_ANSWER_QUESTION&&answerWord.contains(",")) {
|
|
|
+ importPaperCheck.setErrorInfo(
|
|
|
+ getQuesNumInfo(importPaperCheck.getQuesName(), subQuesNum) + "中,答案格式不正确,答案为:" + answerWord);
|
|
|
+ throw new PaperException(importPaperCheck.getErrorInfo());
|
|
|
+ }
|
|
|
String[] pAnswerArray = answerWord.split(",");
|
|
|
List<QuesOption> options = question.getQuesOptions();
|
|
|
List<String> optionNumList = new ArrayList<>();
|