|
@@ -337,7 +337,10 @@ public class ImportPaperService {
|
|
|
}else if(paperDetail == null){
|
|
|
throw new PaperException("导入文件格式有误,必须有大题头信息,且以 [ 开头!");
|
|
|
}else{
|
|
|
- throw new PaperException(importPaperCheck.quesName+ImportPaperMsg.errMsg_12);
|
|
|
+ if(pText.startsWith(ImportPaperMsg.left_bracket)){
|
|
|
+ throw new PaperException(pText + ",标签格式不正确!正确标签格式:[小题分数]、[答案]、[难度]、[一级属性]、[二级属性]、[公开度]、[小题型]");
|
|
|
+ }
|
|
|
+ throw new PaperException(importPaperCheck.getQuesName() +ImportPaperMsg.errMsg_12);
|
|
|
}
|
|
|
if (!StringUtils.isEmpty(importPaperCheck.errorInfo)) {
|
|
|
throw new PaperException(importPaperCheck.errorInfo);
|
|
@@ -382,12 +385,13 @@ public class ImportPaperService {
|
|
|
}
|
|
|
|
|
|
public boolean isMainQuesHeader(String pText){
|
|
|
- return pText.startsWith(ImportPaperMsg.left_bracket)
|
|
|
+ /*return pText.startsWith(ImportPaperMsg.left_bracket)
|
|
|
&& !pText.startsWith(ImportPaperMsg.answer_word)
|
|
|
&& !pText.startsWith(ImportPaperMsg.score_word)
|
|
|
&& !pText.startsWith(ImportPaperMsg.subQuestionType_word)
|
|
|
&& !pText.startsWith(ImportPaperMsg.nestedQuestion_start)
|
|
|
- && !pText.startsWith(ImportPaperMsg.nestedQuestion_number);
|
|
|
+ && !pText.startsWith(ImportPaperMsg.nestedQuestion_number);*/
|
|
|
+ return pText.startsWith(ImportPaperMsg.questionClassify_word);
|
|
|
}
|
|
|
|
|
|
public boolean isHeader(String pText){
|
|
@@ -400,7 +404,8 @@ public class ImportPaperService {
|
|
|
|| pText.startsWith(ImportPaperMsg.subQuestionType_word)
|
|
|
|| pText.startsWith(ImportPaperMsg.subQuesScore_word)
|
|
|
|| pText.startsWith(ImportPaperMsg.nestedQuestion_start)
|
|
|
- || pText.startsWith(ImportPaperMsg.nestedQuestion_number);
|
|
|
+ || pText.startsWith(ImportPaperMsg.nestedQuestion_number)
|
|
|
+ || pText.startsWith(ImportPaperMsg.left_bracket);
|
|
|
}
|
|
|
|
|
|
/**
|