From 18cbd9917bb21ae26956fd1647f2a4d6555c7e81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Thu, 9 Jan 2020 11:50:43 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=A2=98=E5=BA=93=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../question/component/Itembankstop.js | 38 +++++---- .../question/component/JudquestionEditor.js | 85 ++++++++++--------- .../modules/question/component/Listjihe.js | 53 +++++++++--- .../comthetestpaper/Comthetestpaperst.js | 37 ++++---- .../question/questioncss/questioncom.css | 6 +- .../testpaper/testioncss/testioncss.css | 2 +- 6 files changed, 128 insertions(+), 93 deletions(-) diff --git a/public/react/src/modules/question/component/Itembankstop.js b/public/react/src/modules/question/component/Itembankstop.js index 02e728ee9..046565356 100644 --- a/public/react/src/modules/question/component/Itembankstop.js +++ b/public/react/src/modules/question/component/Itembankstop.js @@ -714,32 +714,34 @@ class Itembankstop extends Component { this.NewknTypedeldel(true)}/> -
+
+ )} + - {this.state.Knowpoints === undefined ? "" : this.state.Knowpoints.map((object, index) => { - return ( -
-

{object.name}

+
this.deletesobject(object, index)} src={getImageUrl("images/educoder/bzucha.png")}/> + }}> -
- ) - })} + {this.state.Knowpoints === undefined ? "" : this.state.Knowpoints.map((object, index) => { + return ( +
+

{object.name}

+ this.deletesobject(object, index)} src={getImageUrl("images/educoder/bzucha.png")}/> +
+ ) + })} -
- - )} - + + + 0) { var arr = items.choices; @@ -90,19 +89,38 @@ class Listjihe extends Component { } } } else { - if (items.choices) { - if (items.choices.length > 0) { - var arr = items.choices; - for (var i = 0; i < arr.length; i++) { - if (arr[i].is_answer === true) { - rightkey = i; - break; + // 单选题和判断题 + if(items.item_type === "MULTIPLE"){ + if (items.choices) { + if (items.choices.length > 0) { + var arr = items.choices; + for (var i = 0; i < arr.length; i++) { + if (arr[i].is_answer === true) { + if(MULTIPLEkey===null){ + MULTIPLEkey = tagArrays[i]; + + }else{ + MULTIPLEkey =MULTIPLEkey+ tagArrays[i]; + } + + } } } } - } - + }else{ + if (items.choices) { + if (items.choices.length > 0) { + var arr = items.choices; + for (var i = 0; i < arr.length; i++) { + if (arr[i].is_answer === true) { + rightkey = i; + break; + } + } + } + } + } } } } @@ -182,7 +200,7 @@ class Listjihe extends Component { items === undefined || items === null ? "" : items.choices.map((object, index) => { return (

- + {object.choice_text}

@@ -367,11 +385,18 @@ class Listjihe extends Component {
{ - items.item_type === "SINGLE" || items.item_type === "MULTIPLE" ? + items.item_type === "SINGLE" ?

+

+ : items.item_type === "MULTIPLE"? +

+

:

this.NewknTypedeldel(true)}/> -

+
+ )} + +
+
- {this.state.Knowpoints === undefined ? "" : this.state.Knowpoints.map((object, index) => { - return ( -
-

{object.name}

+ {this.state.Knowpoints === undefined ? "" : this.state.Knowpoints.map((object, index) => { + return ( +
+

{object.name}

- this.deletesobject(object, index)} src={getImageUrl("/images/educoder/bzucha.png")}/> + this.deletesobject(object, index)} src={getImageUrl("/images/educoder/bzucha.png")}/> -
- ) - })} +
+ ) + })} -
- - )} -