Browse Source

再次兼容旧版答题点

zhangjie 3 years ago
parent
commit
416f662900
1 changed files with 9 additions and 0 deletions
  1. 9 0
      src/features/examwork/StudentExamDetail/spins/renderJSON.js

+ 9 - 0
src/features/examwork/StudentExamDetail/spins/renderJSON.js

@@ -48,6 +48,15 @@ function renderBlock(block, inline) {
   // let classList = node.classList
   let node;
   if (block.type === "text") {
+    // TODO:兼容旧版答题点
+    if (block.param && block.param.ntype && block.param.ntype === "cloze") {
+      node = document.createElement("img");
+      node.src = getAnswerPointImg(block.param.nval);
+      node.dataset.isAnswerPoint = true;
+      node.dataset.order = block.param.nval;
+      return node;
+    }
+
     if (
       block.param &&
       ["underline", "bold", "italic"].some((item) => block.param[item])