Selaa lähdekoodia

后端代码提交

weiwenhai 7 vuotta sitten
vanhempi
commit
c3d124f888

+ 1 - 1
examcloud-core-questions-service/src/main/java/cn/com/qmth/examcloud/core/questions/service/ImportPaperService.java

@@ -1223,7 +1223,7 @@ public class ImportPaperService {
                 	throw new PaperException(importPaperCheck.errorInfo);
                 }
                 if (StringUtils.isBlank(nestedQuesType) || getQuesStructType(nestedQuesType) == null) {
-                    importPaperCheck.setErrorInfo(importPaperCheck.quesName+"第"+importPaperCheck.nestedHeadNumber+"个题"+subQuesNum+"中,"+ ImportPaperMsg.errMsg_02);
+                    importPaperCheck.setErrorInfo(importPaperCheck.quesName+"第"+importPaperCheck.nestedHeadNumber+"个题"+subQuesNum+"中,"+ ImportPaperMsg.errMsg_02 + "(" + ImportPaperMsg.errMsg_09 +")");
                     throw new PaperException(importPaperCheck.errorInfo);
                 }
                 subQues = new Question();

+ 3 - 0
examcloud-core-questions-service/src/main/java/cn/com/qmth/examcloud/core/questions/service/impl/GenPaperService.java

@@ -384,6 +384,9 @@ public class GenPaperService {
     	for(String name:map.keySet()) {
     		List<PaperDetailUnit> units = map.get(name);
     		for(PaperDetailUnit unit:units){
+    			if(unit.getQuestion().getDifficultyDegree() == null){
+    				unit.getQuestion().setDifficultyDegree(0.5);
+    			}
     			sum += unit.getScore() * unit.getQuestion().getDifficultyDegree();
     		}
 		}