Commit 34a1862c authored by wujipeng's avatar wujipeng
Browse files

优化

parent 7c80771f
...@@ -460,8 +460,7 @@ public class TheoreticalPaperAdminServiceImpl implements TheoreticalPaperAdminSe ...@@ -460,8 +460,7 @@ public class TheoreticalPaperAdminServiceImpl implements TheoreticalPaperAdminSe
TheoreticalPaperDetailEntity question, String prefix) { TheoreticalPaperDetailEntity question, String prefix) {
if ("单选题".equals(type)) { if ("单选题".equals(type)) {
String normalized = answer.toUpperCase(Locale.ROOT); String normalized = answer.toUpperCase(Locale.ROOT);
if (normalized.length() != 1 || "ABCDE".indexOf(normalized.charAt(0)) < 0 if (normalized.length() != 1 || "ABCDE".indexOf(normalized.charAt(0)) < 0) {
|| !hasOption(question, normalized.charAt(0))) {
throw new BusinessException(prefix + "答案必须是存在的单个选项字母"); throw new BusinessException(prefix + "答案必须是存在的单个选项字母");
} }
requireObjectiveOptions(question, prefix); requireObjectiveOptions(question, prefix);
......
...@@ -132,7 +132,12 @@ ...@@ -132,7 +132,12 @@
END as problem, END as problem,
answer, answer,
participate, participate,
score score,
option_a,
option_b,
option_c,
option_d,
option_e
FROM FROM
theoretical_library theoretical_library
WHERE WHERE
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment