From bf31138c535073e2552e416b1db91c004a4644d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Thu, 2 Jan 2020 14:59:35 +0800 Subject: [PATCH 1/2] =?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/tpm/shixunchild/Challenges/Challengesjupyter.js | 1 + public/react/src/redux/actions/jupyter.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js index de906ad43..0e30f21ea 100644 --- a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js +++ b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js @@ -382,6 +382,7 @@ class Challengesjupyter extends Component { setTimeout(()=>{ this.setState({ jupyter_url :response.data.url, + jupyter_port:response.data.port, booljupyterurls:true, }) },500); diff --git a/public/react/src/redux/actions/jupyter.js b/public/react/src/redux/actions/jupyter.js index 47ddb2149..c58e85b6e 100644 --- a/public/react/src/redux/actions/jupyter.js +++ b/public/react/src/redux/actions/jupyter.js @@ -204,7 +204,7 @@ export const saveJupyterTpi = () => { payload: false }); }); - }, 500) + }, 800) } } From d5e032e72133101c937685eda9216fff06b71919 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Thu, 2 Jan 2020 16:28:10 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=AF=95=E8=AE=BE?= =?UTF-8?q?=E5=92=8C=E6=97=A0=E5=88=86=E7=8F=AD=E7=9A=84=E7=AB=8B=E5=8D=B3?= =?UTF-8?q?=E6=88=AA=E6=AD=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/busyWork/PublishRightnow.js | 13 ++++-- .../tasks/GraduationTasksSubmitedit.js | 43 +++++++++++-------- .../tasks/GraduationTasksSubmitnew.js | 21 +++++---- 3 files changed, 47 insertions(+), 30 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/PublishRightnow.js b/public/react/src/modules/courses/busyWork/PublishRightnow.js index cd1b72633..1b9c8b0f1 100644 --- a/public/react/src/modules/courses/busyWork/PublishRightnow.js +++ b/public/react/src/modules/courses/busyWork/PublishRightnow.js @@ -96,6 +96,7 @@ class PublishRightnow extends Component{ } homeworkstartend=(arg_group_ids,endtime)=>{ + debugger if (this.usingCheckBeforePost && this.props.checkBeforePost) { const goOn = this.props.checkBeforePost(); if (!goOn) { @@ -103,6 +104,7 @@ class PublishRightnow extends Component{ return; } } + debugger const isPublish = this.props.isPublish; let group_ids = arg_group_ids if (this.usingCheckBeforePost) { @@ -110,13 +112,16 @@ class PublishRightnow extends Component{ return item.id }) } - if (this.state.course_groups.length && (!group_ids || group_ids.length == 0)) { - this.props.showNotification('请至少选择一个分班'); - return; + debugger + if(this.state.course_groups.length>0){ + if (this.state.course_groups.length && (!group_ids || group_ids&&group_ids.length == 0)) { + this.props.showNotification('请至少选择一个分班'); + return; + } } let data={} - if(arg_group_ids.length===0){ + if(arg_group_ids&&arg_group_ids.length===0){ data = { homework_ids: this.props.checkBoxValues, end_time: endtime==="Invalid date"?undefined:endtime, diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js index f535c01bb..65fcf4d19 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksSubmitedit.js @@ -41,7 +41,7 @@ class GraduationTasksSubmitedit extends Component{ componentDidMount(){ - + this.props.form.validateFields(); let workId=this.props.match.params.work_Id; let url = "/graduation_works/"+workId+"/edit.json"; @@ -367,7 +367,6 @@ class GraduationTasksSubmitedit extends Component{ let {fileList,selectmemberslist,workslist}=this.state; - this.Commoninterface(fileList,selectmemberslist,workslist); // setTimeout(function () { // GraduationTasksnewtype=true @@ -380,27 +379,37 @@ class GraduationTasksSubmitedit extends Component{ let workId=this.props.match.params.work_Id; let userids=[]; + // for(var list of selectmemberslist){ + // if(list.user_id!=undefined&&list.user_id!=null){ + // userids.push(list.user_id) + // } + // } + if(selectmemberslist!=undefined&&selectmemberslist.length>0){ + selectmemberslist.map((list,key)=>{ + if(list.user_id!=undefined&&list.user_id!=null){ + userids.push(list.user_id) + } + }) + } - for(var list of selectmemberslist){ - if(list.user_id!=undefined&&list.user_id!=null){ - userids.push(list.user_id) - } - } let listid=[]; - for(var list of fileList){ - listid.push(list.response == undefined ? list.id : list.response.id) + // for(var list of fileList){ + // listid.push(list.response == undefined ? list.id : list.response.id) + // } + if(fileList!=undefined&&fileList.length>0){ + fileList.map((list,key)=>{ + listid.push(list.response == undefined ? list.id : list.response.id) + }) } - console.log(userids) - this.props.form.validateFields((err, values) => { + this.props.form.validateFields((err, values) => { // console.log(fileList); if(values.description===undefined||values.description===""){ this.scrollToAnchor("valuestypes"); - // debugger return } @@ -593,7 +602,7 @@ class GraduationTasksSubmitedit extends Component{ {description&&description?
- {/*
*/} +