|
@@ -4086,6 +4086,7 @@ public class ApiController {
|
|
|
|
|
|
// 存在历史答题记录
|
|
|
Integer finalMark = null;
|
|
|
+ Integer passingMark = null;
|
|
|
String expiryDate = null;
|
|
|
boolean valid = false;
|
|
|
|
|
@@ -4095,14 +4096,19 @@ public class ApiController {
|
|
|
WmPlatformQuizTestResult historyResult = quizTestResults.get(0);
|
|
|
|
|
|
finalMark = historyResult.getQuizResult().getFinalMark();
|
|
|
+ passingMark = historyResult.getQuizResult().getPassingMark();
|
|
|
expiryDate = historyResult.getExpiry().format(DatePattern.NORM_DATE_FORMATTER);
|
|
|
valid = today.isBefore(historyResult.getExpiry());
|
|
|
}
|
|
|
|
|
|
history.put("quiz", quiz);
|
|
|
history.put("finalMark", finalMark);
|
|
|
+ history.put("passingMark", passingMark);
|
|
|
history.put("expiryDate", expiryDate);
|
|
|
- history.put("valid", valid);
|
|
|
+ // 是否及格
|
|
|
+ history.put("valid", finalMark != null && passingMark != null && finalMark >= passingMark);
|
|
|
+ // 是否在有效期
|
|
|
+ history.put("dateValid", valid);
|
|
|
histories.add(history);
|
|
|
}
|
|
|
}
|