From fb6fcee96971886f144be425f9345831793422b6 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, 16 Oct 2019 09:41:11 +0800 Subject: [PATCH 01/13] =?UTF-8?q?=E8=B0=83=E6=95=B4=20=20issues/24746=20?= =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E4=BD=9C=E4=B8=9A=E4=BD=9C=E4=B8=9A=E6=8F=8F?= =?UTF-8?q?=E8=BF=B0=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shixunHomework/ShixunHomeworkPage.js | 24 ++- .../shixunHomework/Workquestionandanswer.js | 137 ++++++++---------- 2 files changed, 87 insertions(+), 74 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js index 0983e0fa6..e34b6356a 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js @@ -40,6 +40,7 @@ class ShixunHomeworkPage extends Component { ModalsBottomval:"是否确认重做?", ModalsType:false, mylistisSpin:false, + Showupdateinstructions:false, } } @@ -170,6 +171,18 @@ class ShixunHomeworkPage extends Component { } bindRef = ref => { this.child = ref } ///////////////教师截止 + //编辑作业 + Showupdateinstructionsboolfalse (bool) { + this.setState({ + Showupdateinstructions:bool + }) + } + //开始编辑作业 + edenwork = ()=>{ + this.setState({ + Showupdateinstructions:true + }) + } gotohome=()=>{ // console.log(this.props) let {jobsettingsdatapage}=this.state @@ -304,6 +317,15 @@ class ShixunHomeworkPage extends Component { teacherdatapage && teacherdatapage.code_review === true ? this.workshowmodels(this.child)}>代码查重 : "" : ""} + { + parseInt(tab)===1? + this.props.isAdmin() ? + this.edenwork()}>编辑作业 + :"" + :"" + } + + {this.state.view_report === true ? 查看实训报告 @@ -335,7 +357,7 @@ class ShixunHomeworkPage extends Component { {/*modalsType={this.state.DownloadType}*/} {/*/>*/} {parseInt(tab) === 0 ? this.Getdataback(jobsettingsdata, teacherdata)}>:""} - {parseInt(tab) === 1 ? this.Getdataback(jobsettingsdata, teacherdata)}>:""} + {parseInt(tab) === 1 ? this.Getdataback(jobsettingsdata, teacherdata)} Showupdateinstructionsboolfalse={(i)=>this.Showupdateinstructionsboolfalse(i)}>:""} {parseInt(tab) === 2 ? this.Getdataback(jobsettingsdata, teacherdata)}>:""} {parseInt(tab) === 3 ? this.Getdataback(jobsettingsdata, teacherdata)}>:""} diff --git a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js index 34c484b83..c495222f6 100644 --- a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js +++ b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js @@ -67,7 +67,7 @@ class Workquestionandanswer extends Component { ealuation: false, latededuction: undefined, latedeductiontwo: undefined, - Showupdateinstructions: false, + // Showupdateinstructions: false, database: false, datasheet: false, databasetwo: undefined, @@ -135,11 +135,11 @@ class Workquestionandanswer extends Component { console.log(error) }) } - jobdescriptiondisplaybj = () => { - this.setState({ - Showupdateinstructions: true, - }) - } + // jobdescriptiondisplaybj = () => { + // this.setState({ + // Showupdateinstructions: true, + // }) + // } //统一设置 onChange = (e) => { @@ -275,13 +275,23 @@ class Workquestionandanswer extends Component { }) .then((result) => { if (result) { - this.props.showNotification(`${result.data.message}`); - this.setState({ - Showupdateinstructions: false - }) - var homeworkid = this.props.match.params.homeworkid; - // console.log(homeworkid) - this.Gettitleinformation(homeworkid) + try { + this.props.showNotification(`${result.data.message}`); + }catch (e) { + + } + try { + var homeworkid = this.props.match.params.homeworkid; + + this.Gettitleinformation(homeworkid); + }catch (e) { + + } + try { + this.props.Showupdateinstructionsboolfalse(false); + }catch (e) { + + } } }).catch((error) => { console.log(error); @@ -289,9 +299,7 @@ class Workquestionandanswer extends Component { } NOReleaseNotes = () => { - this.setState({ - Showupdateinstructions: false, - }) + this.props.Showupdateinstructionsboolfalse(false); } workshowmodel = () => { this.setState({ @@ -390,7 +398,7 @@ class Workquestionandanswer extends Component { render() { const dateFormat = 'YYYY-MM-DD HH:mm:ss'; let { - starttimetype, endtimetype, latetimetype, allowlate, latepenaltytype, jobsettingsdata, score_open, Showupdateinstructions + starttimetype, endtimetype, latetimetype, allowlate, latepenaltytype, jobsettingsdata, score_open , homework_id } = this.state; const radioStyle = { @@ -451,69 +459,52 @@ class Workquestionandanswer extends Component {
- {jobsettingsdata === undefined || jobsettingsdata.data.description === null ?
: -
- - -
-
- {/* /!*{}}>
- {/* /!*{jobsettingsdata.data.description}*!/*/} - {/* */} -
- {/*
*/} - {/*

*/} - {/* /!*{ChallengesDataList === undefined ? "" :ChallengesDataList.description===null?""*!/*/} - {/* */} - {/* /!*}*!/*/} - {/*

*/} - - {/*
*/} - -
} - -
-
作业说明:
- { - this.props.isAdmin() && this.props.isAdmin() === true ? - - (Showupdateinstructions && Showupdateinstructions === true ? "" : - this.jobdescriptiondisplaybj()}> - ) : "" - } - -
+ {/*{jobsettingsdata === undefined || jobsettingsdata.data.description === null ?
:*/} + {/*
*/} + {/* */} + {/* */} + {/*
*/} + {/*
*/} + + {/*
*/} + {/*
*/} + {/*
}*/} + + {/*
*/} + {/*
作业说明:
*/} + {/*{*/} + {/* this.props.isAdmin() && this.props.isAdmin() === true ?*/} + + {/* (Showupdateinstructions && Showupdateinstructions === true ? "" :*/} + {/* this.jobdescriptiondisplaybj()}>*/} + {/* ) : ""*/} + {/*}*/} + + {/*
*/}
- {Showupdateinstructions && Showupdateinstructions === true ? + {this.props.Showupdateinstructions && this.props.Showupdateinstructions === true ?
- this.ReleaseNotes(explanations)} + NOReleaseNotes={()=>this.NOReleaseNotes()} description={jobsettingsdata === undefined ? "" : jobsettingsdata === null ? "" : jobsettingsdata === "null" ? "" : jobsettingsdata.data.explanation === undefined ? "" : jobsettingsdata.data.explanation === null ? "" : jobsettingsdata.data.explanation}>
: -
- {jobsettingsdata === undefined ? "无" : jobsettingsdata === null ? "无" : jobsettingsdata === "null" ? "无" : - jobsettingsdata.data.explanation === undefined ? "无" : jobsettingsdata.data.explanation === null ? "无" : +
+ {jobsettingsdata === undefined ? 暂无~ : jobsettingsdata === null ? 暂无~ : jobsettingsdata === "null" ? 暂无~ : + jobsettingsdata.data.explanation === undefined ? 暂无~ : jobsettingsdata.data.explanation === null ? 暂无~ :
} From 08fc8d050f8d2a0458b086bf3ec1eba12b500517 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, 16 Oct 2019 09:47:36 +0800 Subject: [PATCH 02/13] =?UTF-8?q?=E8=B0=83=E6=95=B4=20=20issues/24672=20?= =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E4=BD=9C=E4=B8=9A=EF=BC=8C=E4=BD=9C=E5=93=81?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E9=A1=B5=E9=9D=A2=E7=9A=84=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shixunHomework/Listofworksstudentone.js | 64 +++++++++---------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index 03f0dea64..2f4c92159 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -273,11 +273,11 @@ class Listofworksstudentone extends Component { width:'98px', render: (text, record) => ( - ( - ( - {record.submitstate} @@ -1064,7 +1064,7 @@ class Listofworksstudentone extends Component { ) }, { - title: '最终成绩', + title: '当前成绩', dataIndex: 'finalscore', key: 'finalscore', align: 'center', @@ -1103,7 +1103,7 @@ class Listofworksstudentone extends Component {
{record.levelscore === "--"?关卡得分:0分 :关卡得分:{record.levelscore}分}
{record.efficiencyscore === "--"?效率评分:0分 :效率评分:{record.efficiencyscore}分}
{record.late_penalty === "--"?迟交扣分:0分 :迟交扣分:{record.late_penalty}分}
-
{record.finalscore === "--"?最终成绩:0分 :最终成绩:{record.finalscore}分}
+
{record.finalscore === "--"?当前成绩:0分 :当前成绩:{record.finalscore}分}
}> { record.finalscore&&record.finalscore==="--"? @@ -1231,10 +1231,10 @@ class Listofworksstudentone extends Component { align: 'center', className:'font-14', render: (text, record) => ( - {record.submitstate} @@ -1370,7 +1370,7 @@ class Listofworksstudentone extends Component { ) }, { - title: '最终成绩', + title: '当前成绩', dataIndex: 'finalscore', key: 'finalscore', align: 'center', @@ -1409,7 +1409,7 @@ class Listofworksstudentone extends Component {
{record.levelscore === "--"?关卡得分:0分 :关卡得分:{record.levelscore}分}
{record.efficiencyscore === "--"?效率评分:0分 :效率评分:{record.efficiencyscore}分}
{record.late_penalty === "--"?迟交扣分:0分 :迟交扣分:{record.late_penalty}分}
-
{record.finalscore === "--"?最终成绩:0分 :最终成绩:{record.finalscore}分}
+
{record.finalscore === "--"?当前成绩:0分 :当前成绩:{record.finalscore}分}
}> { record.finalscore&&record.finalscore==="--"? @@ -1619,9 +1619,9 @@ class Listofworksstudentone extends Component { // console.log(homeworkid); // search:搜索关键字 - // order:排序方式:更新时间:update_time,最终成绩:work_score,学号:student_id + // order:排序方式:更新时间:update_time,当前成绩:work_score,学号:student_id // b_order:desc:倒序 , asc:顺序 - // work_status:0:未提交, 1:按时提交, 2:延时提交,“”不限 + // work_status:0:未提交, 1:按时完成, 2:延时完成,“”不限 // course_group:分班情况 [232, 231], []:不限(空数组) var order = "asc"; if (ordervlue === "updated_at") { @@ -1696,7 +1696,7 @@ class Listofworksstudentone extends Component { if(item.title==="效率分") { continue } - if(item.title==="最终成绩") { + if(item.title==="当前成绩") { continue } if(item.title==="学号") { @@ -1733,7 +1733,7 @@ class Listofworksstudentone extends Component { if(item.title==="效率分") { continue } - if(item.title==="最终成绩") { + if(item.title==="当前成绩") { continue } if(item.title==="学号") { @@ -1789,7 +1789,7 @@ class Listofworksstudentone extends Component { stduynumber: teacherdata.student_id, classroom: teacherdata.group_name, cost_time: teacherdata.cost_time, - submitstate: teacherdata.work_status === 0 ? "未提交" : teacherdata.work_status === 1 ? "按时提交" : teacherdata.work_status === 2 ? "延时提交" : "未提交", + submitstate: teacherdata.work_status === 0 ? "未提交" : teacherdata.work_status === 1 ? "按时完成" : teacherdata.work_status === 2 ? "延时完成" : "未提交", // updatetime:this.state.teacherdata.student_works[i].update_time, // updatetime:"", updatetime: timedata === "Invalid date" ? "--" : timedata, @@ -1830,7 +1830,7 @@ class Listofworksstudentone extends Component { stduynumber: student_works[i].student_id, classroom: student_works[i].group_name, cost_time: student_works[i].cost_time, - submitstate: student_works[i].work_status === 0 ? "未提交" : student_works[i].work_status === 1 ? "按时提交" : student_works[i].work_status === 2 ? "延时提交" : "未提交", + submitstate: student_works[i].work_status === 0 ? "未提交" : student_works[i].work_status === 1 ? "按时完成" : student_works[i].work_status === 2 ? "延时完成" : "未提交", // updatetime:this.state.teacherdata.student_works[i].update_time, // updatetime:"", updatetime: timedata === "Invalid date" ? "--" : timedata, @@ -1884,7 +1884,7 @@ class Listofworksstudentone extends Component { if(item.title==="效率分") { continue } - if(item.title==="最终成绩") { + if(item.title==="当前成绩") { continue } if(item.title==="学号") { @@ -1919,7 +1919,7 @@ class Listofworksstudentone extends Component { if(item.title==="效率分") { continue } - if(item.title==="最终成绩") { + if(item.title==="当前成绩") { continue } if(item.title==="学号") { @@ -1972,7 +1972,7 @@ class Listofworksstudentone extends Component { stduynumber: teacherdata.student_id, classroom: teacherdata.group_name, cost_time: teacherdata.cost_time, - submitstate: teacherdata.work_status === 0 ? "未提交" : teacherdata.work_status === 1 ? "按时提交" : teacherdata.work_status === 2 ? "延时提交" : "未提交", + submitstate: teacherdata.work_status === 0 ? "未提交" : teacherdata.work_status === 1 ? "按时完成" : teacherdata.work_status === 2 ? "延时完成" : "未提交", // updatetime:this.state.teacherdata.student_works[i].update_time, // updatetime:"", updatetime: timedata === "Invalid date" ? "--" : timedata, @@ -2119,9 +2119,9 @@ class Listofworksstudentone extends Component { // console.log(homeworkid); // search:搜索关键字 - // order:排序方式:更新时间:update_time,最终成绩:work_score,学号:student_id + // order:排序方式:更新时间:update_time,当前成绩:work_score,学号:student_id // b_order:desc:倒序 , asc:顺序 - // work_status:0:未提交, 1:按时提交, 2:延时提交,“”不限 + // work_status:0:未提交, 1:按时完成, 2:延时完成,“”不限 // course_group:分班情况 [232, 231], []:不限(空数组) var order = "asc"; if (ordervlue === "updated_at") { @@ -2319,7 +2319,7 @@ class Listofworksstudentone extends Component { stduynumber: student_works[i].student_id, classroom: student_works[i].group_name, cost_time: student_works[i].cost_time, - submitstate:student_works[i].work_status === 0 ? "未提交" : student_works[i].work_status === 1 ? "按时提交" :student_works[i].work_status === 2 ? "延时提交" : "未提交", + submitstate:student_works[i].work_status === 0 ? "未提交" : student_works[i].work_status === 1 ? "按时完成" :student_works[i].work_status === 2 ? "延时完成" : "未提交", // updatetime:this.state.teacherdata.student_works[i].update_time, // updatetime:"", updatetime: timedata === "Invalid date" ? "--" : timedata, @@ -2356,7 +2356,7 @@ class Listofworksstudentone extends Component { if(item.title==="效率分") { continue } - if(item.title==="最终成绩") { + if(item.title==="当前成绩") { continue } if(item.title==="学号") { @@ -2394,7 +2394,7 @@ class Listofworksstudentone extends Component { if(item.title==="效率分") { continue } - if(item.title==="最终成绩") { + if(item.title==="当前成绩") { continue } if(item.title==="学号") { @@ -2431,7 +2431,7 @@ class Listofworksstudentone extends Component { if(item.title==="效率分") { continue } - if(item.title==="最终成绩") { + if(item.title==="当前成绩") { continue } if(item.title==="学号") { @@ -2468,7 +2468,7 @@ class Listofworksstudentone extends Component { if(item.title==="效率分") { continue } - if(item.title==="最终成绩") { + if(item.title==="当前成绩") { continue } if(item.title==="学号") { @@ -2502,7 +2502,7 @@ class Listofworksstudentone extends Component { if(item.title==="效率分") { continue } - if(item.title==="最终成绩") { + if(item.title==="当前成绩") { continue } if(item.title==="学号") { @@ -3366,7 +3366,7 @@ class Listofworksstudentone extends Component { From cd07fa6087d58ef1fd9792a65b3994491f13cd8f 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, 16 Oct 2019 10:06:36 +0800 Subject: [PATCH 03/13] =?UTF-8?q?=E8=B0=83=E6=95=B4=20=20/issues/24692=20?= =?UTF-8?q?=20=E9=A2=98=E5=BA=93=E9=80=89=E7=94=A8=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E9=9C=80=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/courses/busyWork/UseBank.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/react/src/modules/courses/busyWork/UseBank.js b/public/react/src/modules/courses/busyWork/UseBank.js index 951408014..c22af3eba 100644 --- a/public/react/src/modules/courses/busyWork/UseBank.js +++ b/public/react/src/modules/courses/busyWork/UseBank.js @@ -35,6 +35,8 @@ class UseBank extends Component{ } } componentDidMount() { + console.log("UseBank"); + console.log(this.props); } onCheckBoxChange = (checkBoxValues) => { From 8cb0a50d36e580a032a6e2d04e3638d22e65b2cd 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, 16 Oct 2019 09:47:36 +0800 Subject: [PATCH 04/13] =?UTF-8?q?=E8=B0=83=E6=95=B4=20=20issues/24672=20?= =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E4=BD=9C=E4=B8=9A=EF=BC=8C=E4=BD=9C=E5=93=81?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E9=A1=B5=E9=9D=A2=E7=9A=84=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shixunHomework/Listofworksstudentone.js | 64 +++++++++---------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index 03f0dea64..2f4c92159 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -273,11 +273,11 @@ class Listofworksstudentone extends Component { width:'98px', render: (text, record) => ( - ( - ( - {record.submitstate} @@ -1064,7 +1064,7 @@ class Listofworksstudentone extends Component { ) }, { - title: '最终成绩', + title: '当前成绩', dataIndex: 'finalscore', key: 'finalscore', align: 'center', @@ -1103,7 +1103,7 @@ class Listofworksstudentone extends Component {
{record.levelscore === "--"?关卡得分:0分 :关卡得分:{record.levelscore}分}
{record.efficiencyscore === "--"?效率评分:0分 :效率评分:{record.efficiencyscore}分}
{record.late_penalty === "--"?迟交扣分:0分 :迟交扣分:{record.late_penalty}分}
-
{record.finalscore === "--"?最终成绩:0分 :最终成绩:{record.finalscore}分}
+
{record.finalscore === "--"?当前成绩:0分 :当前成绩:{record.finalscore}分}
}> { record.finalscore&&record.finalscore==="--"? @@ -1231,10 +1231,10 @@ class Listofworksstudentone extends Component { align: 'center', className:'font-14', render: (text, record) => ( - {record.submitstate} @@ -1370,7 +1370,7 @@ class Listofworksstudentone extends Component { ) }, { - title: '最终成绩', + title: '当前成绩', dataIndex: 'finalscore', key: 'finalscore', align: 'center', @@ -1409,7 +1409,7 @@ class Listofworksstudentone extends Component {
{record.levelscore === "--"?关卡得分:0分 :关卡得分:{record.levelscore}分}
{record.efficiencyscore === "--"?效率评分:0分 :效率评分:{record.efficiencyscore}分}
{record.late_penalty === "--"?迟交扣分:0分 :迟交扣分:{record.late_penalty}分}
-
{record.finalscore === "--"?最终成绩:0分 :最终成绩:{record.finalscore}分}
+
{record.finalscore === "--"?当前成绩:0分 :当前成绩:{record.finalscore}分}
}> { record.finalscore&&record.finalscore==="--"? @@ -1619,9 +1619,9 @@ class Listofworksstudentone extends Component { // console.log(homeworkid); // search:搜索关键字 - // order:排序方式:更新时间:update_time,最终成绩:work_score,学号:student_id + // order:排序方式:更新时间:update_time,当前成绩:work_score,学号:student_id // b_order:desc:倒序 , asc:顺序 - // work_status:0:未提交, 1:按时提交, 2:延时提交,“”不限 + // work_status:0:未提交, 1:按时完成, 2:延时完成,“”不限 // course_group:分班情况 [232, 231], []:不限(空数组) var order = "asc"; if (ordervlue === "updated_at") { @@ -1696,7 +1696,7 @@ class Listofworksstudentone extends Component { if(item.title==="效率分") { continue } - if(item.title==="最终成绩") { + if(item.title==="当前成绩") { continue } if(item.title==="学号") { @@ -1733,7 +1733,7 @@ class Listofworksstudentone extends Component { if(item.title==="效率分") { continue } - if(item.title==="最终成绩") { + if(item.title==="当前成绩") { continue } if(item.title==="学号") { @@ -1789,7 +1789,7 @@ class Listofworksstudentone extends Component { stduynumber: teacherdata.student_id, classroom: teacherdata.group_name, cost_time: teacherdata.cost_time, - submitstate: teacherdata.work_status === 0 ? "未提交" : teacherdata.work_status === 1 ? "按时提交" : teacherdata.work_status === 2 ? "延时提交" : "未提交", + submitstate: teacherdata.work_status === 0 ? "未提交" : teacherdata.work_status === 1 ? "按时完成" : teacherdata.work_status === 2 ? "延时完成" : "未提交", // updatetime:this.state.teacherdata.student_works[i].update_time, // updatetime:"", updatetime: timedata === "Invalid date" ? "--" : timedata, @@ -1830,7 +1830,7 @@ class Listofworksstudentone extends Component { stduynumber: student_works[i].student_id, classroom: student_works[i].group_name, cost_time: student_works[i].cost_time, - submitstate: student_works[i].work_status === 0 ? "未提交" : student_works[i].work_status === 1 ? "按时提交" : student_works[i].work_status === 2 ? "延时提交" : "未提交", + submitstate: student_works[i].work_status === 0 ? "未提交" : student_works[i].work_status === 1 ? "按时完成" : student_works[i].work_status === 2 ? "延时完成" : "未提交", // updatetime:this.state.teacherdata.student_works[i].update_time, // updatetime:"", updatetime: timedata === "Invalid date" ? "--" : timedata, @@ -1884,7 +1884,7 @@ class Listofworksstudentone extends Component { if(item.title==="效率分") { continue } - if(item.title==="最终成绩") { + if(item.title==="当前成绩") { continue } if(item.title==="学号") { @@ -1919,7 +1919,7 @@ class Listofworksstudentone extends Component { if(item.title==="效率分") { continue } - if(item.title==="最终成绩") { + if(item.title==="当前成绩") { continue } if(item.title==="学号") { @@ -1972,7 +1972,7 @@ class Listofworksstudentone extends Component { stduynumber: teacherdata.student_id, classroom: teacherdata.group_name, cost_time: teacherdata.cost_time, - submitstate: teacherdata.work_status === 0 ? "未提交" : teacherdata.work_status === 1 ? "按时提交" : teacherdata.work_status === 2 ? "延时提交" : "未提交", + submitstate: teacherdata.work_status === 0 ? "未提交" : teacherdata.work_status === 1 ? "按时完成" : teacherdata.work_status === 2 ? "延时完成" : "未提交", // updatetime:this.state.teacherdata.student_works[i].update_time, // updatetime:"", updatetime: timedata === "Invalid date" ? "--" : timedata, @@ -2119,9 +2119,9 @@ class Listofworksstudentone extends Component { // console.log(homeworkid); // search:搜索关键字 - // order:排序方式:更新时间:update_time,最终成绩:work_score,学号:student_id + // order:排序方式:更新时间:update_time,当前成绩:work_score,学号:student_id // b_order:desc:倒序 , asc:顺序 - // work_status:0:未提交, 1:按时提交, 2:延时提交,“”不限 + // work_status:0:未提交, 1:按时完成, 2:延时完成,“”不限 // course_group:分班情况 [232, 231], []:不限(空数组) var order = "asc"; if (ordervlue === "updated_at") { @@ -2319,7 +2319,7 @@ class Listofworksstudentone extends Component { stduynumber: student_works[i].student_id, classroom: student_works[i].group_name, cost_time: student_works[i].cost_time, - submitstate:student_works[i].work_status === 0 ? "未提交" : student_works[i].work_status === 1 ? "按时提交" :student_works[i].work_status === 2 ? "延时提交" : "未提交", + submitstate:student_works[i].work_status === 0 ? "未提交" : student_works[i].work_status === 1 ? "按时完成" :student_works[i].work_status === 2 ? "延时完成" : "未提交", // updatetime:this.state.teacherdata.student_works[i].update_time, // updatetime:"", updatetime: timedata === "Invalid date" ? "--" : timedata, @@ -2356,7 +2356,7 @@ class Listofworksstudentone extends Component { if(item.title==="效率分") { continue } - if(item.title==="最终成绩") { + if(item.title==="当前成绩") { continue } if(item.title==="学号") { @@ -2394,7 +2394,7 @@ class Listofworksstudentone extends Component { if(item.title==="效率分") { continue } - if(item.title==="最终成绩") { + if(item.title==="当前成绩") { continue } if(item.title==="学号") { @@ -2431,7 +2431,7 @@ class Listofworksstudentone extends Component { if(item.title==="效率分") { continue } - if(item.title==="最终成绩") { + if(item.title==="当前成绩") { continue } if(item.title==="学号") { @@ -2468,7 +2468,7 @@ class Listofworksstudentone extends Component { if(item.title==="效率分") { continue } - if(item.title==="最终成绩") { + if(item.title==="当前成绩") { continue } if(item.title==="学号") { @@ -2502,7 +2502,7 @@ class Listofworksstudentone extends Component { if(item.title==="效率分") { continue } - if(item.title==="最终成绩") { + if(item.title==="当前成绩") { continue } if(item.title==="学号") { @@ -3366,7 +3366,7 @@ class Listofworksstudentone extends Component { From 05eafe2bbb7c06aca62966d5013c0c4041be5869 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, 16 Oct 2019 10:06:36 +0800 Subject: [PATCH 05/13] =?UTF-8?q?=E8=B0=83=E6=95=B4=20=2024692=20=20?= =?UTF-8?q?=E9=A2=98=E5=BA=93=E9=80=89=E7=94=A8=E6=96=B0=E5=A2=9E=E9=9C=80?= =?UTF-8?q?=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/courses/busyWork/UseBank.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/react/src/modules/courses/busyWork/UseBank.js b/public/react/src/modules/courses/busyWork/UseBank.js index 951408014..c22af3eba 100644 --- a/public/react/src/modules/courses/busyWork/UseBank.js +++ b/public/react/src/modules/courses/busyWork/UseBank.js @@ -35,6 +35,8 @@ class UseBank extends Component{ } } componentDidMount() { + console.log("UseBank"); + console.log(this.props); } onCheckBoxChange = (checkBoxValues) => { From 356e7d953eac6b8a21d0e7608eefe4bab6d6acaa 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, 16 Oct 2019 10:34:23 +0800 Subject: [PATCH 06/13] =?UTF-8?q?=E8=B0=83=E6=95=B4=2024692=20=20=E9=A2=98?= =?UTF-8?q?=E5=BA=93=E9=80=89=E7=94=A8=E6=96=B0=E5=A2=9E=E9=9C=80=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/courses/busyWork/UseBank.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/react/src/modules/courses/busyWork/UseBank.js b/public/react/src/modules/courses/busyWork/UseBank.js index c22af3eba..a9e854e39 100644 --- a/public/react/src/modules/courses/busyWork/UseBank.js +++ b/public/react/src/modules/courses/busyWork/UseBank.js @@ -292,6 +292,9 @@ class UseBank extends Component{ nav_my==='public' && {item.username} } + 编辑 +

) })} From d768f8d7c72fdf0004c89a9c32da6b9260164277 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, 16 Oct 2019 11:46:18 +0800 Subject: [PATCH 07/13] =?UTF-8?q?=E8=B0=83=E6=95=B4=2024692=20=20=E9=A2=98?= =?UTF-8?q?=E5=BA=93=E9=80=89=E7=94=A8=E6=96=B0=E5=A2=9E=E9=9C=80=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/busyWork/UseBank.js | 23 ++++++++++++++++--- .../modules/courses/graduation/tasks/index.js | 2 +- .../courses/graduation/topics/index.js | 2 +- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/UseBank.js b/public/react/src/modules/courses/busyWork/UseBank.js index a9e854e39..724474b7c 100644 --- a/public/react/src/modules/courses/busyWork/UseBank.js +++ b/public/react/src/modules/courses/busyWork/UseBank.js @@ -184,6 +184,9 @@ class UseBank extends Component{ let { flag, nav_my, loading, hasMore, object_list, search, checkBoxValues,isChecked,page,is_teacher }=this.state let { object_type }=this.props; const antIcon = ; + console.log("题库选用2222"); + console.log("UseBank"); + console.log(this.props); return( @@ -288,31 +294,32 @@ class UseBank extends Component{
10 && item.course_list_name} - className={nav_my==='myself'?"fl with30 color-grey-6 task-hide pl5 bankwidth":"fl with30 color-grey-6 task-hide pl5 bankwidth"} + className={nav_my === 'myself' ? "fl with30 color-grey-6 task-hide pl5 bankwidth" : "fl with30 color-grey-6 task-hide pl5 bankwidth2"} >{item.course_list_name} { nav_my==='public' && {item.username} } - { - this.props.object_type && this.props.object_type === "normal" ? + {nav_my === "myself" ? + (this.props.object_type && this.props.object_type === "normal" ? 编辑 : this.props.object_type && this.props.object_type === "group" ? - 编辑 - : this.props.object_type && this.props.object_type === "exercise" ? 编辑 - : this.props.object_type && this.props.object_type === "poll" ? + href={`/banks/group/${item.id}/edit/publicly?tab=0`} + >编辑 + : this.props.object_type && this.props.object_type === "exercise" ? 编辑 - : "" + href={`/banks/exercise/${item.id}/edit/personal`} + >编辑 + : this.props.object_type && this.props.object_type === "poll" ? + 编辑 + : "") + : "" } From 25cd7ba53fc6dbdaf959d2ad0fdd030616156cea 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, 16 Oct 2019 14:01:08 +0800 Subject: [PATCH 10/13] =?UTF-8?q?=E8=B0=83=E6=95=B4=2024841=20=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E5=AF=BC=E8=88=AA=E6=A0=8F=E5=8A=A8=E6=80=81=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E5=B7=A5=E7=A8=8B=E8=AE=A4=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/tpm/NewHeader.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index 29b6baa04..543c71c69 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -955,12 +955,9 @@ submittojoinclass=(value)=>{ {/*众包创新*/} {/**/} {/*
  • 交流问答
  • */} - {/*工程认证*/} - - - +
  • 工程认证
  • 0 ? 'block' : 'none'}}> From 72097dea15db8a192a245adbc0e6425ae3f6c7c7 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Wed, 16 Oct 2019 14:38:47 +0800 Subject: [PATCH 11/13] =?UTF-8?q?=E9=97=AE=E5=8D=B7=E7=9A=84=E7=AB=8B?= =?UTF-8?q?=E5=8D=B3=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/exercises_controller.rb | 2 +- app/controllers/polls_controller.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/exercises_controller.rb b/app/controllers/exercises_controller.rb index ee8e632b5..d71b72618 100644 --- a/app/controllers/exercises_controller.rb +++ b/app/controllers/exercises_controller.rb @@ -722,7 +722,7 @@ class ExercisesController < ApplicationController ex_status = exercise.exercise_status #则为试卷的状态 else ex_status = @course.course_groups.where(id: params[:group_ids]).size != - exercise.exercise_group_settings.where("course_group_id", params[:group_ids]).exercise_group_published.size ? 1 : 0 + exercise.exercise_group_settings.where(course_group_id: params[:group_ids]).exercise_group_published.size ? 1 : 0 end if ex_status == 1 #如果试卷存在已发布的,或者是已截止的,那么则直接跳过 g_course = group_ids #表示是否传入分班参数,如果传入分班的参数,那么试卷的统一设置需修改 diff --git a/app/controllers/polls_controller.rb b/app/controllers/polls_controller.rb index b4da1256e..cb507fdcb 100644 --- a/app/controllers/polls_controller.rb +++ b/app/controllers/polls_controller.rb @@ -280,7 +280,7 @@ class PollsController < ApplicationController pl_status = poll.polls_status #则为试卷的状态 else pl_status = @course.course_groups.where(id: group_ids).size != - poll.poll_group_settings.where("course_group_id", group_ids).poll_group_published.size ? 1 : 0 #立即发布针对分组设置的全部未发布的班级才生效 + poll.poll_group_settings.where(course_group_id: group_ids).poll_group_published.size ? 1 : 0 #立即发布针对分组设置的全部未发布的班级才生效 end if pl_status == 1 #如果问卷存在已发布的,或者是已截止的,那么则直接跳过 g_course = group_ids #表示是否传入分班参数,如果传入分班的参数,那么poll的统一设置需修改 From 7a24b1fa708e33bc663639f32afbf6c27d9065a9 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, 16 Oct 2019 14:46:17 +0800 Subject: [PATCH 12/13] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/forums/RightMyPublish.js | 151 +++++++++--------- 1 file changed, 75 insertions(+), 76 deletions(-) diff --git a/public/react/src/modules/forums/RightMyPublish.js b/public/react/src/modules/forums/RightMyPublish.js index fc101ae30..69ce9912c 100644 --- a/public/react/src/modules/forums/RightMyPublish.js +++ b/public/react/src/modules/forums/RightMyPublish.js @@ -1,76 +1,75 @@ -import React, { Component } from 'react'; -import { Redirect } from 'react-router'; - -import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom"; - -import PropTypes from 'prop-types'; - -import classNames from 'classnames' - -import { getImageUrl, toPath, LinkAfterLogin } from 'educoder' - -import match_adImg from '../../images/ad/match_ad.jpg' -const $ = window.$ - -class RightMyPublish extends Component { - constructor(props) { - super(props) - - this.state = { - - } - } - - handleKeyPress = (event) => { - if(event.type !== 'keypress' || event.key == 'Enter'){ - this.props.setSearchValue( this.props.searchValue, true); - // $(window).trigger('setSearchValue', $('#shixun_search_input').val()) - } - } - handleInput = (event) => { - this.props.setSearchValue(event.target.value); - } - - render() { - const { match, history, currentPage, my_memos_count, setSearchValue, searchValue } = this.props - - return ( - -
    - {/*
    -
    - - - × -
    - -
    */} - -
    - - - - - - -
    - 发布话题 - {/*

    - 我的发布
    - {my_memos_count} -

    */} -
    - -
    - -
    -
    - ); - } -} - -export default RightMyPublish; +import React, { Component } from 'react'; +import { Redirect } from 'react-router'; + +import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom"; + +import PropTypes from 'prop-types'; + +import classNames from 'classnames' + +import { getImageUrl, toPath, LinkAfterLogin } from 'educoder' + +import match_adImg from '../../images/ad/match_ad.jpg' +const $ = window.$ + +class RightMyPublish extends Component { + constructor(props) { + super(props) + + this.state = { + + } + } + + handleKeyPress = (event) => { + if(event.type !== 'keypress' || event.key == 'Enter'){ + this.props.setSearchValue( this.props.searchValue, true); + // $(window).trigger('setSearchValue', $('#shixun_search_input').val()) + } + } + handleInput = (event) => { + this.props.setSearchValue(event.target.value); + } + + render() { + const { match, history, currentPage, my_memos_count, setSearchValue, searchValue } = this.props + + return ( + +
    + {/*
    +
    + + + × +
    + +
    */} +
    + + + + + + +
    + 发布话题 + {/*

    + 我的发布
    + {my_memos_count} +

    */} +
    + +
    + +
    +
    + ); + } +} + +export default RightMyPublish; From c48ef87479e98e6a46c2f6b9baa24720120b3fea Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Wed, 16 Oct 2019 14:47:06 +0800 Subject: [PATCH 13/13] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=88=86=E7=8F=AD?= =?UTF-8?q?=E5=92=8C=E6=96=B0=E5=A2=9E=E8=AE=A8=E8=AE=BA=E5=8C=BA=E5=AD=90?= =?UTF-8?q?=E7=9B=AE=E5=BD=95=E8=BF=94=E5=9B=9Eid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/boards_controller.rb | 3 +-- app/controllers/course_groups_controller.rb | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/controllers/boards_controller.rb b/app/controllers/boards_controller.rb index 2bcc8d8f6..9d3afc80c 100644 --- a/app/controllers/boards_controller.rb +++ b/app/controllers/boards_controller.rb @@ -20,9 +20,8 @@ class BoardsController < ApplicationController new_board.parent_id = board.try(:id) new_board.position = board.children.count + 1 new_board.save! + render :json => {category_id: new_board.id, status: 0, message: "添加成功"} end - - normal_status(0, "添加成功") end # 子目录的拖动 diff --git a/app/controllers/course_groups_controller.rb b/app/controllers/course_groups_controller.rb index bfdb959b4..42a070734 100644 --- a/app/controllers/course_groups_controller.rb +++ b/app/controllers/course_groups_controller.rb @@ -9,8 +9,8 @@ class CourseGroupsController < ApplicationController if @course.course_groups.where(name: params[:name]).count > 0 normal_status(-1, "已存在同名分班") else - @course.course_groups.create!(name: params[:name], position: @course.course_groups.count + 1) - normal_status(0, "创建成功") + course_group = @course.course_groups.create!(name: params[:name], position: @course.course_groups.count + 1) + render :json => {group_id: course_group.id, status: 0, message: "创建成功"} end end