diff --git a/public/react/src/modules/courses/shixunHomework/Shixunworkdetails/ShixunWorkModal.js b/public/react/src/modules/courses/shixunHomework/Shixunworkdetails/ShixunWorkModal.js
index 9cf381455..630b6861d 100644
--- a/public/react/src/modules/courses/shixunHomework/Shixunworkdetails/ShixunWorkModal.js
+++ b/public/react/src/modules/courses/shixunHomework/Shixunworkdetails/ShixunWorkModal.js
@@ -184,10 +184,10 @@ class ShixunWorkModal extends Component{
if (response.data.status === 0) {
this.props.updatas()
this.props.issCancel()
- notification.open({
- message:"提示",
- description: response.data.message
- });
+ // notification.open({
+ // message:"提示",
+ // description: response.data.message
+ // });
this.props.history.replace(`/courses/${this.props.match.params.coursesId}/shixun_homeworks/${this.props.match.params.homeworkid}/student_work`);
}else if(response.data.status === -1){
notification.open({
diff --git a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js
index 9616eae58..da13cd330 100644
--- a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js
+++ b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js
@@ -509,7 +509,7 @@ class Workquestionandanswer extends Component {
}
{/* /!*{jobsettingsdata.data.description}*!/*/}
@@ -559,7 +559,7 @@ class Workquestionandanswer extends Component {
{jobsettingsdata === undefined ? "无" : jobsettingsdata === null ? "无" : jobsettingsdata === "null" ? "无" :
jobsettingsdata.data.explanation === undefined ? "无" : jobsettingsdata.data.explanation === null ? "无" :
-
}
diff --git a/public/react/src/modules/paths/PathDetail/PathDetailIndex.js b/public/react/src/modules/paths/PathDetail/PathDetailIndex.js
index ee7579ddc..6843f678a 100644
--- a/public/react/src/modules/paths/PathDetail/PathDetailIndex.js
+++ b/public/react/src/modules/paths/PathDetail/PathDetailIndex.js
@@ -342,7 +342,7 @@ class PathDetailIndex extends Component{
{detailInfoList === undefined ? "" :detailInfoList.description===null?"":
-
+
}
diff --git a/public/react/src/modules/tpm/shixunchild/Challenges/Challenges.js b/public/react/src/modules/tpm/shixunchild/Challenges/Challenges.js
index 4ef6abfa3..b98e9a8ab 100644
--- a/public/react/src/modules/tpm/shixunchild/Challenges/Challenges.js
+++ b/public/react/src/modules/tpm/shixunchild/Challenges/Challenges.js
@@ -304,7 +304,7 @@ class Challenges extends Component {
id="challenge_editorMd_description">
{ChallengesDataList === undefined ? "" :ChallengesDataList&&ChallengesDataList.description===null?"":
-
+
}
From ea9a4f329477867d3dc6f7845fa4656c1d1a0055 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, 9 Jul 2019 23:25:20 +0800
Subject: [PATCH 2/7] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../react/src/modules/courses/poll/PollNew.js | 984 ++++++++++--------
.../courses/shixunHomework/Listofworks.js | 14 -
2 files changed, 530 insertions(+), 468 deletions(-)
diff --git a/public/react/src/modules/courses/poll/PollNew.js b/public/react/src/modules/courses/poll/PollNew.js
index a3513db40..de0a5bbeb 100644
--- a/public/react/src/modules/courses/poll/PollNew.js
+++ b/public/react/src/modules/courses/poll/PollNew.js
@@ -63,6 +63,8 @@ class PollNew extends Component {
problemtopicbool: false,
newoption: false,
cancellation: false,
+ bindingid:undefined,
+ Newdisplay:false,
}
// console.log("试卷新建和编辑");
// console.log(JSON.stringify(props));
@@ -311,7 +313,9 @@ class PollNew extends Component {
newoption: false
})
}
-
+ this.setState({
+ Newdisplay:true,
+ })
var Insertposition = this.state.poll_questions.length;
// console.log(JSON.stringify(this.state.poll_questions));
for (var i = 0; i < this.state.poll_questions.length; i++) {
@@ -332,7 +336,9 @@ class PollNew extends Component {
newoption: false
})
}
-
+ this.setState({
+ Newdisplay:true,
+ })
var Insertposition = this.state.poll_questions.length;
// console.log(JSON.stringify(this.state.poll_questions));
for (var i = 0; i < this.state.poll_questions.length; i++) {
@@ -349,7 +355,9 @@ class PollNew extends Component {
//添加主观题目
addmymainsint = () => {
-
+ this.setState({
+ Newdisplay:true,
+ })
var Insertposition = this.state.poll_questions.length;
// console.log(JSON.stringify(this.state.poll_questions));
for (var i = 0; i < this.state.poll_questions.length; i++) {
@@ -375,8 +383,9 @@ class PollNew extends Component {
var anserbool = false;
this.setState({
q_countst: 1,
+ bindingid:object.question.id
})
- window.scrollTo(0, this.refs.targetElement.offsetTop)
+ // window.scrollTo(0, this.refs.targetElement.offsetTops)
let {adddom} = this.state;
// var arr =new Object(objects);
// console.log(arr)
@@ -522,7 +531,8 @@ class PollNew extends Component {
// console.log(pollid)
// console.log(Insertposition)
// console.log(Whether)
- // console.log(id)
+ console.log("addMytopic");
+ console.log(id);
if (this.state.q_countst > 0) {
this.props.showNotification(`不能同时编辑两题`);
@@ -537,7 +547,7 @@ class PollNew extends Component {
Insertposition: Insertposition,
q_countst: 1,
})
- window.scrollTo(0, this.refs.targetElement.offsetTop)
+ // window.scrollTo(0, this.refs.targetElement.offsetTop)
var arrr = this.state.adddom;
let newarrr = [...arrr];
@@ -551,12 +561,13 @@ class PollNew extends Component {
var question = {}
var questiontwo = {
// "id": this.state.poll_questions[arr.length - 1].question.id + 1 + arrr.length,
- "id": this.state.poll_questions[newarr.length - 1].question.id + 1,
+ "id": Whether=== true? id :this.state.poll_questions[newarr.length - 1].question.id,
"is_necessary": 1,
"question_number": 1,
"question_title": "",
"question_type": 1,
"new": "new",
+ "newid":Whether=== true? id :this.state.poll_questions[newarr.length - 1].question.id + 1,
"answers": [
{"answer_id": 1, "answer_position": 1, "answer_text": ""},
{"answer_id": 2, "answer_position": 2, "answer_text": ""},
@@ -578,7 +589,7 @@ class PollNew extends Component {
//插入多选题
var question = {}
var questiontwo = {
- "id": this.state.poll_questions[newarr.length - 1].question.id + 1,
+ "id": Whether=== true? id :this.state.poll_questions[newarr.length - 1].question.id,
"is_necessary": 1,
"question_number": 2,
"question_title": "",
@@ -586,6 +597,7 @@ class PollNew extends Component {
"max_choices": 0,
"min_choices": 0,
"new": "new",
+ "newid":Whether=== true? id :this.state.poll_questions[newarr.length - 1].question.id + 1,
"answers": [
{"answer_id": 1, "answer_position": 1, "answer_text": ""},
{"answer_id": 2, "answer_position": 2, "answer_text": ""},
@@ -608,12 +620,13 @@ class PollNew extends Component {
// console.log(this.state.poll_questions[newarr.length - 1].question.id);
var question = {}
var questiontwo = {
- "id": this.state.poll_questions[newarr.length - 1].question.id + 1,
+ "id": Whether=== true? id :this.state.poll_questions[newarr.length - 1].question.id,
"is_necessary": 1,
"question_number": 3,
"question_title": "",
"question_type": 3,
"new": "new",
+ "newid":Whether=== true? id :this.state.poll_questions[newarr.length - 1].question.id + 1,
"answers": []
};
question = {"question": questiontwo};
@@ -629,20 +642,21 @@ class PollNew extends Component {
/////上面视图全部删除后 要加载的
if (index === 1) {
// 插入单选题
- var id;
+ var ids;
try {
- id = this.state.poll_questions[newarr.length - 1].question.id + 1
+ ids = this.state.poll_questions[newarr.length - 1].question.id;
} catch (e) {
- id = 1;
+ ids= 1;
}
var questiontwo = {
// "id": this.state.poll_questions[arr.length - 1].question.id + 1 + arrr.length,
- "id": id,
+ "id": Whether=== true? id :ids,
"is_necessary": 1,
"question_number": 1,
"question_title": "",
"question_type": 1,
"new": "new",
+ "newid":Whether=== true? id :this.state.poll_questions[newarr.length - 1].question.id + 1,
"answers": [
{"answer_id": 1, "answer_position": 1, "answer_text": ""},
{"answer_id": 2, "answer_position": 2, "answer_text": ""},
@@ -662,14 +676,14 @@ class PollNew extends Component {
} else if (index === 2) {
//插入多选题
- var id;
+ var ids;
try {
- id = this.state.poll_questions[newarr.length - 1].question.id + 1
+ ids = this.state.poll_questions[newarr.length - 1].question.id;
} catch (e) {
- id = 1;
+ ids = 1;
}
var questiontwo = {
- "id": id,
+ "id": Whether=== true? id :ids,
"is_necessary": 1,
"question_number": 2,
"question_title": "",
@@ -677,6 +691,7 @@ class PollNew extends Component {
"max_choices": 0,
"min_choices": 0,
"new": "new",
+ "newid":Whether=== true? id :this.state.poll_questions[newarr.length - 1].question.id + 1,
"answers": [
{"answer_id": 1, "answer_position": 1, "answer_text": ""},
{"answer_id": 2, "answer_position": 2, "answer_text": ""},
@@ -696,19 +711,20 @@ class PollNew extends Component {
} else if (index === 3) {
//插入主观题
- var id;
+ var ids;
try {
- id = this.state.poll_questions[newarr.length - 1].question.id + 1
+ ids= this.state.poll_questions[newarr.length - 1].question.id;
} catch (e) {
- id = 1;
+ ids = 1;
}
var questiontwo = {
- "id": id,
+ "id":Whether=== true? id : ids,
"is_necessary": 1,
"question_number": 3,
"question_title": "",
"question_type": 3,
"new": "new",
+ "newid":Whether=== true? id :this.state.poll_questions[newarr.length - 1].question.id + 1,
"answers": []
};
question = {"question": questiontwo};
@@ -723,26 +739,51 @@ class PollNew extends Component {
}
//删除指定条目
- Deleteadddom = (indexo) => {
+ Deleteadddom = (indexo,bool) => {
// console.log("deleteadddom 259")
+
var arr = this.state.adddom;
let newarr = [...arr];
-
newarr.splice(indexo, 1);
- this.setState({
- adddom: newarr,
- q_countst: 0,
- problemtopic: null,
- problemtopicbool: false,
- })
+ if(bool === true) {
+ this.setState({
+ adddom: newarr,
+ q_countst: 0,
+ problemtopic: null,
+ problemtopicbool: false,
+ bindingid:undefined,
+ Newdisplay:false,
+ })
+
+ }else{
+ this.setState({
+ adddom: newarr,
+ q_countst: 0,
+ problemtopic: null,
+ problemtopicbool: false,
+ Newdisplay:false,
+ })
+ }
+
}
//保存并继续
//保存并继续,即提交本题的新建并继续创建一个相同的题(该新题处于编辑模式,题目和选项不要清空)
- Deleteadddomtwo = (indexo, object) => {
+ Deleteadddomtwo = (indexo, object,bool) => {
var thiss = this;
- this.setState({
- q_countst: 1,
- })
+ if(bool === true){
+ this.setState({
+ q_countst: 1,
+ bindingid:undefined,
+ Newdisplay:false,
+
+ })
+ }else {
+ this.setState({
+ q_countst: 1,
+ Newdisplay:false,
+ })
+ }
+
var poll_questionslength = this.state.poll_questions.length;
// console.log("deleteadddomtwo|||||||||||||||||||||||||||||||||||||||||\\");
// console.log(indexo);
@@ -1229,7 +1270,15 @@ class PollNew extends Component {
//保存,即完成新建并退出本题编辑
// indexo 第几个数组
//object 单个数组数据
- Deleteadddomthree = (indexo, object) => {
+ Deleteadddomthree = (indexo, object,bool) => {
+ if(bool === true) {
+ this.setState({
+ bindingid:undefined,
+ })
+ }
+ this.setState({
+ Newdisplay:false,
+ })
// console.log("deleteadddom 349")
var thiss = this;
let arr = this.state.adddom;
@@ -2485,7 +2534,7 @@ class PollNew extends Component {
console.log(this.state.poll_questions);
console.log(this.state.adddom);
let resultDom;
- resultDom =
+ resultDom =
第{index + 1}题:
this.addMytopic(item.question.question_type, this.state.pollid, index + 1, true, item.question.id)}>
- this.adddomedit(item)}> this.adddomedit(item)}>
: this.adddomedit(item)}>
@@ -2538,244 +2587,7 @@ class PollNew extends Component {
})}
{/*单选题*/}
-
- {this.state.adddom === undefined ? "" : item.question.question_type === 1&&this.state.adddom.map((itemo, indexo) => {
- let arrid = itemo.question.id;
- let resultDomtwo;
- resultDomtwo =
-
-
{itemo.question.question_type === 1 ? "单选题" : itemo.question.question_type === 2 ? "多选题" : "主观题"}
- this.OnCheckAllChange(e, indexo)}
- className="lineh-40"
- style={{"marginLeft": "20px"}}>必答
-
-
-
-
- {itemo.question.answers === undefined ? "" : itemo.question.answers.map((itemt, indext) => {
- return (
-
- )
- })}
-
-
- {itemo.question.question_type === 1 ? (
-
-
- {this.state.polls_status === undefined || this.state.polls_status === 1 ?
-
this.Ewoption(itemo.question.id, itemo)}>新增选项
-
- : ""}
- {this.state.polls_status === undefined || this.state.polls_status === 1 ?
-
- (this.state.newoption === false ?
-
this.Addanotheroption(itemo.question.id)}>新增其他选项
- : "")
- : ""}
-
- this.Deleteadddom(indexo)}>取消
- this.Deleteadddomthree(indexo, itemo)}>保存
- this.Deleteadddomtwo(indexo, itemo)}>保存并继续
-
-
-
-
-
- )
-
-
- : itemo.question.question_type === 2 ? (
- //////////////////////////////////////////// 可选
-
-
-
-
可选
-
- {/*可选最小*/}
-
-
- ~
- {/*可选最大*/}
-
- 项
- (学生答题时,系统对其选择的选项个数进行限制,--表示不限制)
-
-
-
-
-
- )
-
- : (
)
-
- }
-
-
- {itemo.question.question_type === 2 ?
- (
- this.state.polls_status === undefined || this.state.polls_status === 1 ?
-
-
-
this.Ewoption(itemo.question.id, itemo)}>新增选项
-
- {
- this.state.newoption === false ?
this.Addanotheroption(itemo.question.id)}>新增其他选项 : ""
- }
-
-
-
-
-
- this.Deleteadddom(indexo)}>取消
- this.Deleteadddomthree(indexo, itemo)}>保存
- this.Deleteadddomtwo(indexo, itemo)}>保存并继续
-
-
-
-
- :
-
-
- this.Deleteadddom(indexo)}>取消
- this.Deleteadddomthree(indexo, itemo)}>保存
- this.Deleteadddomtwo(indexo, itemo)}>保存并继续
-
-
- )
-
- : itemo.question.question_type === 3 ?
-
-
- this.Deleteadddom(indexo)}>取消
- this.Deleteadddomthree(indexo, itemo)}>保存
- this.Deleteadddomtwo(indexo, itemo)}>保存并继续
-
-
- :
- ""}
-
-
-
-
-
-
- return (
-
- {resultDomtwo}
-
- )
- })}
-
-
: item.question.question_type === 2 ?
@@ -2791,12 +2603,27 @@ class PollNew extends Component {
})}
{/*多选题*/}
-
- {this.state.adddom === undefined ? "" : item.question.question_type === 2&&this.state.adddom.map((itemo, indexo) => {
+
+
+ : item.question.question_type === 3 ?
+ // 主观题
+ (
+
) : (
)}
+
+
+ return (
+
+ {/*这里是编辑和新增的地方*/}
+ {
+ this.state.bindingid && this.state.bindingid===item.question.id?
+ (this.state.Newdisplay === false?
+
+
+ {this.state.adddom === undefined ? "" :this.state.adddom===undefined?"": this.state.adddom.length===0?"":item.question.id === this.state.adddom[0].question.id&&this.state.adddom.map((itemo, indexo) => {
let arrid = itemo.question.id;
let resultDomtwo;
resultDomtwo =
-
+
{itemo.question.question_type === 1 ? "单选题" : itemo.question.question_type === 2 ? "多选题" : "主观题"}
) : itemt.answer_text === "其他" ? (
其它
this.Deleteadddom(indexo)}>取消
+ onClick={() => this.Deleteadddom(indexo,true)}>取消
this.Deleteadddomthree(indexo, itemo)}>保存
+ onClick={() => this.Deleteadddomthree(indexo, itemo,true)}>保存
this.Deleteadddomtwo(indexo, itemo)}>保存并继续
+ onClick={() => this.Deleteadddomtwo(indexo, itemo,true)}>保存并继续
@@ -2965,7 +2792,7 @@ class PollNew extends Component {
{itemo.question.question_type === 2 ?
(
this.state.polls_status === undefined || this.state.polls_status === 1 ?
-
+
this.Ewoption(itemo.question.id, itemo)}>新增选项
@@ -2980,11 +2807,11 @@ class PollNew extends Component {
this.Deleteadddom(indexo)}>取消
+ onClick={() => this.Deleteadddom(indexo,true)}>取消
this.Deleteadddomthree(indexo, itemo)}>保存
+ onClick={() => this.Deleteadddomthree(indexo, itemo,true)}>保存
this.Deleteadddomtwo(indexo, itemo)}>保存并继续
+ onClick={() => this.Deleteadddomtwo(indexo, itemo,true)}>保存并继续
@@ -2993,24 +2820,24 @@ class PollNew extends Component {
this.Deleteadddom(indexo)}>取消
+ onClick={() => this.Deleteadddom(indexo,true)}>取消
this.Deleteadddomthree(indexo, itemo)}>保存
+ onClick={() => this.Deleteadddomthree(indexo, itemo,true)}>保存
this.Deleteadddomtwo(indexo, itemo)}>保存并继续
+ onClick={() => this.Deleteadddomtwo(indexo, itemo,true)}>保存并继续
)
: itemo.question.question_type === 3 ?
-
+
this.Deleteadddom(indexo)}>取消
+ onClick={() => this.Deleteadddom(indexo,true)}>取消
this.Deleteadddomthree(indexo, itemo)}>保存
+ onClick={() => this.Deleteadddomthree(indexo, itemo,true)}>保存
this.Deleteadddomtwo(indexo, itemo)}>保存并继续
+ onClick={() => this.Deleteadddomtwo(indexo, itemo,true)}>保存并继续
:
@@ -3028,16 +2855,18 @@ class PollNew extends Component {
)
})}
-
-
- : item.question.question_type === 3 ?
- // 主观题
- (
- {this.state.adddom === undefined ? "" : item.question.question_type === 3&&this.state.adddom.map((itemo, indexo) => {
- let arrid = itemo.question.id;
- let resultDomtwo;
- resultDomtwo =
-
+
:"")
+ :
+
+ {resultDom}
+ {this.state.Newdisplay === false?
+
+
+ {this.state.adddom === undefined ? "" :this.state.adddom===undefined?"": this.state.adddom.length===0?"":item.question.id === this.state.adddom[0].question.id&&this.state.adddom.map((itemo, indexo) => {
+ let arrid = itemo.question.id;
+ let resultDomtwo;
+ resultDomtwo =
+
{itemo.question.question_type === 1 ? "单选题" : itemo.question.question_type === 2 ? "多选题" : "主观题"}
必答
-
+ onInput={(e) => this.HandleInputTopic(e, indexo)}>{itemo.question.question_title}
- {itemo.question.answers === undefined ? "" : itemo.question.answers.map((itemt, indext) => {
- return (
-
- {itemt.answer_text === undefined ? (
-
) : itemt.answer_text === "其他" ? (
-
+ {itemo.question.answers === undefined ? "" : itemo.question.answers.map((itemt, indext) => {
+ return (
+
- )
- })}
-
-
- {itemo.question.question_type === 1 ? (
-
-
+
{this.state.polls_status === undefined || this.state.polls_status === 1 ?
-
this.Ewoption(itemo.question.id, itemo)}>新增选项
-
+
this.Deleteentrys(arrid, indext, false)}>
: ""}
- {this.state.polls_status === undefined || this.state.polls_status === 1 ?
+ )}
+
+ )
+ })}
- (this.state.newoption === false ?
+
+ {itemo.question.question_type === 1 ? (
+
+
+ {this.state.polls_status === undefined || this.state.polls_status === 1 ?
this.Addanotheroption(itemo.question.id)}>新增其他选项
- : "")
- : ""}
-
+ onClick={() => this.Ewoption(itemo.question.id, itemo)}>新增选项
+
+ : ""}
+ {this.state.polls_status === undefined || this.state.polls_status === 1 ?
+
+ (this.state.newoption === false ?
+ this.Addanotheroption(itemo.question.id)}>新增其他选项
+ : "")
+ : ""}
+
this.Deleteadddom(indexo)}>取消
+ onClick={() => this.Deleteadddom(indexo,true)}>取消
this.Deleteadddomthree(indexo, itemo)}>保存
+ onClick={() => this.Deleteadddomthree(indexo, itemo,true)}>保存
this.Deleteadddomtwo(indexo, itemo)}>保存并继续
+ onClick={() => this.Deleteadddomtwo(indexo, itemo,true)}>保存并继续
+
-
- )
+ )
- : itemo.question.question_type === 2 ? (
- //////////////////////////////////////////// 可选
-
-
-
+ : itemo.question.question_type === 2 ? (
+ //////////////////////////////////////////// 可选
+
+
+
可选
-
- {/*可选最小*/}
-
-
- ~
- {/*可选最大*/}
-
- )
- })}
-
-
项
-
(学生答题时,系统对其选择的选项个数进行限制,--表示不限制)
+
+
+ )
+
+ : (
)
+
+ }
+
+
+ {itemo.question.question_type === 2 ?
+ (
+ this.state.polls_status === undefined || this.state.polls_status === 1 ?
+
+
+
this.Ewoption(itemo.question.id, itemo)}>新增选项
+
+ {
+ this.state.newoption === false ?
this.Addanotheroption(itemo.question.id)}>新增其他选项 : ""
+ }
+
+
+
+ this.Deleteadddom(indexo,true)}>取消
+ this.Deleteadddomthree(indexo, itemo,true)}>保存
+ this.Deleteadddomtwo(indexo, itemo,true)}>保存并继续
+
+
+
+
+ :
+
+
+ this.Deleteadddom(indexo,true)}>取消
+ this.Deleteadddomthree(indexo, itemo,true)}>保存
+ this.Deleteadddomtwo(indexo, itemo,true)}>保存并继续
+
-
)
- : (
)
+ : itemo.question.question_type === 3 ?
+
+
+ this.Deleteadddom(indexo,true)}>取消
+ this.Deleteadddomthree(indexo, itemo,true)}>保存
+ this.Deleteadddomtwo(indexo, itemo,true)}>保存并继续
+
+
+ :
+ ""}
- }
+
+
+
+
+ return (
- {itemo.question.question_type === 2 ?
- (
- this.state.polls_status === undefined || this.state.polls_status === 1 ?
-
+ {resultDomtwo}
+
+ )
+ })}
+
:""}
+
+ }
+
-
this.Ewoption(itemo.question.id, itemo)}>新增选项
+ )
+ })}
- {
- this.state.newoption === false ?
this.Addanotheroption(itemo.question.id)}>新增其他选项 : ""
- }
+
+ {/*新建单选多选2*/}
+
+ {
+ this.state.Newdisplay === true?
+
+ {this.state.adddom === undefined ? "" : this.state.adddom.map((itemo, indexo) => {
+ // console.log('打印this.state.adddom')
+ // console.log(this.state.adddom);
+ let arrid = itemo.question.id;
+ let resultDomtwo;
+ resultDomtwo =
+
+
{itemo.question.question_type === 1 ? "单选题" : itemo.question.question_type === 2 ? "多选题" : "主观题"}
+ this.OnCheckAllChange(e, indexo)}
+ className="lineh-40"
+ style={{"marginLeft": "20px"}}>必答
+
+
+
+
+ {itemo.question.answers === undefined ? "" : itemo.question.answers.map((itemt, indext) => {
+ return (
+
+ )
+ })}
+
+
+ {itemo.question.question_type === 1 ? (
+
+
+ {polls_status === undefined || polls_status === 1 ?
+
this.Ewoption(itemo.question.id, itemo)}>新增选项
+
+ : ""}
+ {polls_status === undefined || polls_status === 1 ?
+
+ (newoption === false ?
+
this.Addanotheroption(itemo.question.id)}>新增其他选项
+ : "")
+ : ""}
+
+ this.Deleteadddom(indexo)}>取消
+ this.Deleteadddomthree(indexo, itemo)}>保存
+ this.Deleteadddomtwo(indexo, itemo)}>保存并继续
+
+
+
+
+
+ )
+
+
+ : itemo.question.question_type === 2 ? (
+ //////////////////////////////////////////// 可选
+
+
+
+
可选
+
+ {/*可选最小*/}
+
+ this.HandleGradationGroupChangee(value, indexo, itemo.question.max_choices, itemo.question.answers.length)}
+ value={itemo.question.min_choices === 0 || itemo.question.min_choices === "0" ? "--" : itemo.question.min_choices === null ? "--" : itemo.question.min_choices === undefined ? "--" : itemo.question.min_choices}
+
+ >
+
+ {itemo.question.answers === undefined ? "" : itemo.question.answers.map((itemt, indext) => {
+ return (
+ indext >= 1 ? : ""
+ )
+ })}
+
+ ~
+ {/*可选最大*/}
+ this.HandleGradationGroupChangeee(value, indexo)}
+ value={itemo.question.max_choices === 0 || itemo.question.max_choices === "0" ? "--" : itemo.question.min_choices === null ? "--" : itemo.question.min_choices === undefined ? "--" : itemo.question.max_choices}
+ >
+
+ {itemo.question.answers === undefined ? "" : itemo.question.answers.map((itemt, indext) => {
+ return (
+ indext >= 1 ? : ""
+
+ )
+ })}
+
+ 项
+ (学生答题时,系统对其选择的选项个数进行限制,--表示不限制)
+
+
+
+ )
-
+ : ()
+
+ }
+
+
+ {itemo.question.question_type === 2 ?
+ (
+ polls_status === undefined || polls_status === 1 ?
+
+
+
this.Ewoption(itemo.question.id, itemo)}>新增选项
+
+ {
+ newoption === false ?
this.Addanotheroption(itemo.question.id)}>新增其他选项 : ""
+ }
+
+
+
+
+
this.Deleteadddom(indexo)}>取消
this.Deleteadddomtwo(indexo, itemo)}>保存并继续
-
+
- :
-
+ :
+
this.Deleteadddom(indexo)}>取消
@@ -3240,11 +3321,11 @@ class PollNew extends Component {
this.Deleteadddomtwo(indexo, itemo)}>保存并继续
-
- )
+
+ )
- : itemo.question.question_type === 3 ?
-
+ : itemo.question.question_type === 3 ?
+
this.Deleteadddom(indexo)}>取消
@@ -3253,40 +3334,35 @@ class PollNew extends Component {
this.Deleteadddomtwo(indexo, itemo)}>保存并继续
-
- :
- ""}
+
+ :
+ ""}
-
-
+
+
- return (
-
- {resultDomtwo}
-
- )
- })}
-
) : (
)}
-
+ return (
+
+ {resultDomtwo}
+
+ )
+ })}
+
+ :
+ ""
+ }
- return (
-
- {resultDom}
-
- )
- })}
-
{polls_status === undefined || polls_status === 1 ?
{
this.props.match.params.news === "new" ?
this.state.Newedit === false ?
-
+
this.addmysingles()}>
-
+
this.addmysingles()}>单选题
diff --git a/public/react/src/modules/courses/shixunHomework/Listofworks.js b/public/react/src/modules/courses/shixunHomework/Listofworks.js
index 33bb37a6e..d9abecd72 100644
--- a/public/react/src/modules/courses/shixunHomework/Listofworks.js
+++ b/public/react/src/modules/courses/shixunHomework/Listofworks.js
@@ -337,13 +337,6 @@ class Listofworks extends Component {
render: (text, record) => (
record.submitstate === "未提交" ?
-- :
-
- 直接调整最终成绩的分数
- 其它评分全部作废
- }>
- this.Viewstudenttraininginformations(record)}>调分
-
this.Viewstudenttraininginformation(record)}>{record.operating}
@@ -590,13 +583,6 @@ class Listofworks extends Component {
render: (text, record) => (
record.submitstate === "未提交" ? -- :
-
- 直接调整最终成绩的分数
- 其它评分全部作废
- }>
-
this.Viewstudenttraininginformations(record)}>调分
-
this.Viewstudenttraininginformation(record)}>{record.operating}
From 0cbfc1971ab62386802b84a0665fcd2bacb193c0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Wed, 10 Jul 2019 08:42:35 +0800
Subject: [PATCH 3/7] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../courses/graduation/tasks/GraduationTasksSubmitnew.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js
index 4ac9a7cc5..2d75a9af8 100644
--- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js
+++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitnew.js
@@ -413,14 +413,14 @@ class GraduationTasksSubmitnew extends Component{
let id=this.props.match.params.task_Id;
-
+
if(fileList.length === 0){
this.setState({
shixunsreplace:true,
})
return
}
-
+debugger
let url="/graduation_tasks/"+id+"/graduation_works.json";
axios.post(url, {
description:values.description,
From 9f69aafe2ded6ed92344a65ced67dbd41b98b701 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Wed, 10 Jul 2019 09:00:23 +0800
Subject: [PATCH 4/7] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../courses/graduation/tasks/GraduationTaskssetting.js | 4 ++--
.../courses/graduation/tasks/GraduationTaskssettinglist.js | 4 ++--
.../graduation/tasks/GraduationTaskssettingquestions.js | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js
index e01dfbb68..27aa34e21 100644
--- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js
+++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js
@@ -1103,8 +1103,8 @@ class GraduationTaskssettingapp extends Component{
{this.props.isAdmin()?
导出
:""}
diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js
index 517c2ec0b..2ad892e64 100644
--- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js
+++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js
@@ -1079,8 +1079,8 @@ class GraduationTaskssettinglist extends Component{
{this.props.isAdmin()?
导出
:""}
diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js
index abe4c0804..d4708b209 100644
--- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js
+++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettingquestions.js
@@ -352,8 +352,8 @@ class GraduationTasksquestions extends Component{
{this.props.isAdmin()?
导出
:""}
From b8d7473c3efb0dbfd7c2f56b7a8c997aad98dafd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Wed, 10 Jul 2019 09:31:45 +0800
Subject: [PATCH 5/7] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../tasks/GraduationTaskssettinglist.js | 23 +++++++++++--------
1 file changed, 14 insertions(+), 9 deletions(-)
diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js
index 2ad892e64..5a02169e7 100644
--- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js
+++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js
@@ -73,14 +73,14 @@ class GraduationTaskssettinglist extends Component{
//get 数组
axios.get(url,{
params: {
- teacher_comment:teacher_comment,
- task_status:task_status,
- course_group:course_group,
- cross_comment:cross_comment,
- order:order,
- b_order:b_order,
- search:search,
- page:pages,
+ teacher_comment:teacher_comment===null?undefined:teacher_comment,
+ task_status:task_status===null?undefined:task_status,
+ course_group:course_group===null?undefined:course_group,
+ cross_comment:cross_comment===null?undefined:cross_comment,
+ order:order===null?undefined:order,
+ b_order:b_order===null?undefined:b_order,
+ search:search===null?undefined:search,
+ page:pages===null?undefined:pages,
limit:20,
},
paramsSerializer: function(params) {
@@ -148,7 +148,12 @@ class GraduationTaskssettinglist extends Component{
loadingstate:true
})
- this.seacthdata(list.length===key?undefined:list, task_status, course_group, cross_comment, order, b_order, search,this.state.page);
+ if(list.length===key){
+
+ }else{
+ this.seacthdata(list, task_status, course_group, cross_comment, order, b_order, search,this.state.page);
+
+ }
}
From b46b2b84eba636688a06a41120b2b706b43d9b23 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Wed, 10 Jul 2019 10:08:13 +0800
Subject: [PATCH 6/7] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../courses/graduation/tasks/GraduationTaskssettinglist.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js
index 5a02169e7..a28ae2fa1 100644
--- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js
+++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js
@@ -144,14 +144,14 @@ class GraduationTaskssettinglist extends Component{
let {teacher_comment, task_status, course_group, cross_comment, order, b_order, search} = this.state;
this.setState({
- teacher_comment:list.length===key?null:list,
+ teacher_comment:list.length===key?undefined:list[0],
loadingstate:true
})
if(list.length===key){
}else{
- this.seacthdata(list, task_status, course_group, cross_comment, order, b_order, search,this.state.page);
+ this.seacthdata(list[0], task_status, course_group, cross_comment, order, b_order, search,this.state.page);
}
From 302e92d7b5999258a0646baba0acc03ae76a74bf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Wed, 10 Jul 2019 10:26:03 +0800
Subject: [PATCH 7/7] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../shixunHomework/Listofworksstudentone.js | 12 +++--
.../shixunHomework/Trainingjobsetting.js | 44 +++++++++----------
2 files changed, 30 insertions(+), 26 deletions(-)
diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js
index 99d2e3c0a..33b90083b 100644
--- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js
+++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js
@@ -550,6 +550,8 @@ class Listofworksstudentone extends Component {
}
}
+ // console.log("554");
+ // console.log(columns2);
this.setState({
@@ -577,7 +579,7 @@ class Listofworksstudentone extends Component {
}
}
- else if(this.props.isNotMember()===true&&item.title==="学号") {
+ if(this.props.isNotMember()===true&&item.title==="学号") {
}else{
arr.push(item);
@@ -640,6 +642,8 @@ class Listofworksstudentone extends Component {
}
// console.log("datalistdatalist文件");
// console.log(datalist);
+ // console.log("645");
+ // console.log(columns2);
this.setState({
data: datalist,
teacherlist: teacherlist,
@@ -835,7 +839,9 @@ class Listofworksstudentone extends Component {
}
render() {
let {visibles, game_list,columns, limit,experience, boolgalist,viewtrainingdata, teacherdata, page, data, jobsettingsdata, styletable, datas, order, loadingstate,computeTimetype} = this.state;
-
+ // console.log(this.state.data);
+ // console.log("841");
+ // console.log(this.state.columns);
return (
teacherdata === undefined || teacherdata.student_works === undefined || teacherdata.student_works === null || JSON.stringify(teacherdata.student_works) === "[]" ?
// 学生不能查看别人的
@@ -1018,7 +1024,7 @@ class Listofworksstudentone extends Component {
}
`}
- {data === undefined ? "" :
{
- // console.log("640");
// console.log(this.state.end_time);
- if(e.target.value ==="允许补交"){
+ if(e.target.checked ===true){
if(this.state.end_time !== null && this.state.end_time!== undefined){
// console.log(this.state.end_time);
// var times = this.state.deadline.format('YYYY-MM-DD HH:mm');
@@ -665,16 +660,19 @@ class Trainingjobsetting extends Component {
this.setState({
- allowreplenishment: e.target.value,
+ allowreplenishment: e.target.checked,
latededuction:5,
whethertopay:true,
})
}else {
this.setState({
- allowreplenishment: e.target.value,
+ allowreplenishment: e.target.checked,
latededuction:0,
whethertopay:false,
+ hand__e_tip: "",
+ hand_flags: false,
+ handclass:"",
})
}
@@ -1239,7 +1237,7 @@ class Trainingjobsetting extends Component {
this.setState({
publish_time:moment(handleDateString(dateString))
})
- if(this.state.allowreplenishment === "允许补交") {
+ if(this.state.allowreplenishment === true) {
this.setState({
end_time:moment(handleDateString(dateString)).add(1, 'months'),
deadline:moment(handleDateString(dateString)).add(1, 'months').format('YYYY-MM-DD HH:mm'),
@@ -1303,7 +1301,7 @@ class Trainingjobsetting extends Component {
end_time:moment(handleDateString(dateString))
})
// this.onChangedata('end_time', value, dateString);
- if(this.state.allowreplenishment === "允许补交"){
+ if(this.state.allowreplenishment === true){
this.setState({
deadline:moment(handleDateString(dateString)).format('YYYY-MM-DD HH:mm'),
late_time:moment(handleDateString(dateString)).add(2, 'months'),
@@ -1580,7 +1578,7 @@ class Trainingjobsetting extends Component {
if(moment(this.state.late_time,"YYYY-MM-DD HH:mm")<=moment()){
endtime=false;
}
- if(this.state.allowreplenishment === "禁止补交"){
+ if(this.state.allowreplenishment === false){
whethertopays=false;
}
this.setState({
@@ -1985,11 +1983,11 @@ class Trainingjobsetting extends Component {
-
-
- 允许补交 (选中,则允许学生延时提交作品)
+ {/*value={this.state.allowreplenishment}*/}
+
+
开启补交 (选中,则允许学生延时提交作品)
迟交扣分:
@@ -2049,8 +2047,8 @@ class Trainingjobsetting extends Component {
}
-
禁止补交
-
+ {/*
禁止补交*/}
+
{/*评分设置*/}