From d7954eccb94ab907c1fedd9fcabf9c13db51807b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Tue, 7 Jan 2020 14:18:49 +0800
Subject: [PATCH] =?UTF-8?q?=E9=A2=98=E5=BA=93?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../modules/question/component/Listjihe.js | 72 +++
public/react/src/modules/tpm/NewHeader.js | 448 +++++++++---------
2 files changed, 293 insertions(+), 227 deletions(-)
diff --git a/public/react/src/modules/question/component/Listjihe.js b/public/react/src/modules/question/component/Listjihe.js
index bec5835f5..a9322a74d 100644
--- a/public/react/src/modules/question/component/Listjihe.js
+++ b/public/react/src/modules/question/component/Listjihe.js
@@ -17,7 +17,10 @@ const tagArrays = [
'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
]
+<<<<<<< HEAD
+=======
+>>>>>>> d0ddf91... 题库
class Listjihe extends Component {
constructor(props) {
super(props);
@@ -97,6 +100,7 @@ class Listjihe extends Component {
MULTIPLEkey = MULTIPLEkey + tagArrays[i];
}
+<<<<<<< HEAD
}
}
}
@@ -111,10 +115,44 @@ class Listjihe extends Component {
rightkey = i;
break;
}
+=======
+ // 编程答案
+ var rightkey=null
+
+ if(items){
+ if(items.item_type){
+ if(items.item_type==="PROGRAM"){
+
+ }else{
+ if(items.item_type==="JUDGMENT") {
+
+
+ if(items.choices){
+ if(items.choices.length>0){
+ var arr= items.choices;
+ for(let data of arr) {
+ if(data.is_answer===true){
+ rightkey=data.choice_text;
+ break;
+>>>>>>> d0ddf91... 题库
}
}
}
}
+ }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;
+ }
+ }
+ }
+ }
+
+
}
}
}
@@ -196,6 +234,7 @@ class Listjihe extends Component {
{/*内容*/}
+<<<<<<< HEAD
{items.item_type === "JUDGMENT" ?
{
@@ -211,6 +250,23 @@ class Listjihe extends Component {
}
:
items.item_type === "PROGRAM" ?
+=======
+ {items.item_type==="JUDGMENT"?
+
+ {
+ items === undefined ||items === null? "" : items.choices.map((object, index) => {
+ return (
+
+
+ {object.choice_text}
+
+
+ )
+ })
+ }
+ :
+ items.item_type==="PROGRAM"?
+>>>>>>> d0ddf91... 题库
{
@@ -401,6 +457,7 @@ class Listjihe extends Component {
+<<<<<<< HEAD
{
@@ -423,6 +480,21 @@ class Listjihe extends Component {
dangerouslySetInnerHTML={{ __html: markdownToHTML("答案:" + rightkey).replace(/▁/g, "▁▁▁") }}
>
+=======
+
+
+ {
+ items.item_type==="SINGLE" || items.item_type==="MULTIPLE"?
+
+
+ :
+
+
+>>>>>>> d0ddf91... 题库
}
diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js
index 60df25c5d..d0e16331e 100644
--- a/public/react/src/modules/tpm/NewHeader.js
+++ b/public/react/src/modules/tpm/NewHeader.js
@@ -992,15 +992,9 @@ class NewHeader extends Component {
-<<<<<<< HEAD
-
-
-
- {/**/}
-
- {/*
*/}
- {/*搜索框*/}
- {showSearchOpentype === true ?
this.hideshowSearchOpen(e)} onMouseLeave={() => this.setevaluatinghides()}>
-
: ""}
-
- {/**/}
- {/* TODO 需要服务端接口提供最近搜索
+
+
+ {/**/}
+
+ {/*
*/}
+ {/*搜索框*/}
+ {showSearchOpentype === true ?
this.hideshowSearchOpen(e)} onMouseLeave={() => this.setevaluatinghides()}>
+
: ""}
+
+ {/**/}
+ {/* TODO 需要服务端接口提供最近搜索
*/}
+
-
{/*
<%= link_to '登录', signin_path, :className => "mr5" %>
<%= link_to '注册', user_join_path, :className => "ml5" %>
*/}
- {
- user === undefined ?
-
- this.educoderlogin()} className="mr5 color-white">登录
-
- 注册
- : user.login === "" ?
- this.educoderlogin()} className="mr5 color-white">登录
-
- 注册
- :
-
-
-
-
-
-
- {/*{user.username}*/}
- - 我的个人主页
- {coursestypes === true ? "" : - {this.props.user && this.props.user.main_site === false ? "我的课堂" : "我的教学课堂"}
}
- {/* p 老师 l 学生 */}
- {shixuntype === true ? "" : - 我的实训项目
}
- {pathstype === true ? "" : - {this.props.user && this.props.user.main_site === false ? "我的课程" : "我的实践课程"}
}
- {this.props.user && this.props.user.main_site === true ? - 我的开发项目
: ""}
- {/*- 我的众包
*/}
- -
- 客户管理
-
- {
- this.props.Headertop && this.props.Headertop.college_identifier &&
- - 学院统计
- }
- {
- this.props.Headertop && this.props.Headertop.laboratory_user &&
- - 后台管理
- }
+ {
+ user === undefined ?
+
+ this.educoderlogin()} className="mr5 color-white">登录
+
+ 注册
+ : user.login === "" ?
+ this.educoderlogin()} className="mr5 color-white">登录
+
+ 注册
+ :
+
- }
- {/*href="https://www.educoder.net/login"*/ }
-
+ }
+ {/*href="https://www.educoder.net/login"*/}
+ */}
+
+
+
+
+
+
+
+
+ {coursestypes === true && this.props.user && this.props.user.main_site === false ? "" :
+
+ {coursestypes === true ? "" : -
+ {this.props.user && this.props.user.main_site === false ? "加入课堂" : "加入教学课堂"}
+
}
+
+ {Addcoursestypes === true ? this.HideAddcoursestypess(i)}
+ /> : ""}
+
+
+
+ {/* /courses/join_course_multi_role */}
+ {this.props.user && this.props.user.main_site === true ? -
+ 加入开发项目
+
: ""}
+ {tojoinitemtype === true ?
+
+
*/}
-
+
请输入6位项目邀请码
+
-
-
+
+
+ 管理人员
+ 开发人员
+ 报告人员
+
-
-
-
- {coursestypes === true && this.props.user && this.props.user.main_site === false ? "" :
+
+
+ : ""}
+ }
+
+
+
+ {this.props.user && this.props.user.main_site === true ?
-
+
+
+ {/*{this.props.Headertop===undefined?"":this.props.Headertop.unread_message_count > 99 ? '99+'*/}
+ {/*: this.props.Headertop===undefined?"":this.props.Headertop.unread_message_count}*/}
+
+
+ }
- {this.props.user && this.props.user.main_site === true ? : ""}
-
: ""}
-
-
-
+