From bc218fe3dacb79db13d8bd7b429e17acc14ed704 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, 8 Aug 2019 15:44:47 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=20=E8=B0=83=E6=95=B4=E5=AE=9E=E8=B7=B5?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E6=8F=90=E4=BA=A4=E6=88=90=E5=8A=9F=E5=90=8E?= =?UTF-8?q?=E7=BB=A7=E7=BB=AD=E6=8F=90=E4=BA=A4=20=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E5=A4=9A=E4=B8=AA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tpm/challengesnew/TPMchallengesnew.js | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/public/react/src/modules/tpm/challengesnew/TPMchallengesnew.js b/public/react/src/modules/tpm/challengesnew/TPMchallengesnew.js index 7a6f1ec4b..1dd042605 100644 --- a/public/react/src/modules/tpm/challengesnew/TPMchallengesnew.js +++ b/public/react/src/modules/tpm/challengesnew/TPMchallengesnew.js @@ -178,7 +178,9 @@ export default class TPMchallengesnew extends Component { } CreatePracticesend = () => { - this.setState({ + + + this.setState({ CreatePracticesendtype:true }) @@ -237,14 +239,15 @@ export default class TPMchallengesnew extends Component { exec_time:exec_time }).then((response) => { if (response.data.status === 1) { - $("html").animate({ scrollTop: 0 }) - - this.setState({ - setopen: true, - CreatePracticesendtype:false, - tab2url: "/shixuns/" + id + "/challenges/"+response.data.challenge_id+"/tab=2", - tab3url: "/shixuns/" + id + "/challenges/"+response.data.challenge_id+"/tab=3", - }) + // $("html").animate({ scrollTop: 0 }) + + window.location.href=`/shixuns/${id}/challenges/${response.data.challenge_id}/editcheckpoint`; + // this.setState({ + // setopen: true, + // CreatePracticesendtype:false, + // tab2url: "/shixuns/" + id + "/challenges/"+response.data.challenge_id+"/tab=2", + // tab3url: "/shixuns/" + id + "/challenges/"+response.data.challenge_id+"/tab=3", + // }) } this.props.showSnackbar(response.data.messages); From 7f3037aff33047ac86fe26ff4ce9e7980911a418 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 8 Aug 2019 16:28:42 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E7=A7=81=E6=9C=89=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E5=85=88=E5=BC=B9=E5=AE=8C=E5=96=84=E8=B5=84=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/application_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 3c501267a..359661d4b 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -39,6 +39,7 @@ class ApplicationController < ActionController::Base @user_course_identity = current_user.course_identity(@course) if @user_course_identity > Course::STUDENT && @course.is_public == 0 tip_exception(401, "..") unless User.current.logged? + check_account tip_exception(409, "您没有权限进入") end uid_logger("###############user_course_identity:#{@user_course_identity}") From 311122cb2c18a0ce1af731d6ffff7a6d20a80bfd 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, 8 Aug 2019 16:38:34 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=20=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/courses/coursesDetail/CoursesBanner.js | 6 +++--- .../react/src/modules/tpm/TPMsettings/TPMsettings.js | 8 ++++++++ public/react/src/modules/tpm/newshixuns/Newshixuns.js | 11 ++++++++++- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js index 54325512a..2ab4228bb 100644 --- a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js +++ b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js @@ -498,13 +498,13 @@ class CoursesBanner extends Component { - 教师 {coursedata.teacher_count} + 教师 {coursedata.teacher_count} - 学生 {coursedata.student_count} + 学生 {coursedata.student_count} {coursedata.credit===null?"": - 学分 {coursedata.credit} + 学分 {coursedata.credit} } diff --git a/public/react/src/modules/tpm/TPMsettings/TPMsettings.js b/public/react/src/modules/tpm/TPMsettings/TPMsettings.js index 06833ee0d..3aec340d4 100644 --- a/public/react/src/modules/tpm/TPMsettings/TPMsettings.js +++ b/public/react/src/modules/tpm/TPMsettings/TPMsettings.js @@ -1112,16 +1112,20 @@ export default class TPMsettings extends Component { // this.deleteAttachment(this.state.file); this.setState({ file:undefined, + deleteisnot:true, languagewrite:"", systemenvironment:"", testcoderunmode:"", + fileList:[] }) }else { this.setState({ file:undefined, + deleteisnot:true, languagewrite:"", systemenvironment:"", testcoderunmode:"", + fileList:[] }) } // this.props.showNotification('提交成功!'); @@ -1154,16 +1158,20 @@ export default class TPMsettings extends Component { // this.deleteAttachment(this.state.file); this.setState({ file:undefined, + deleteisnot:true, languagewrite:"", systemenvironment:"", testcoderunmode:"", + fileList:[] }) }else { this.setState({ file:undefined, + deleteisnot:true, languagewrite:"", systemenvironment:"", testcoderunmode:"", + fileList:[] }) } } diff --git a/public/react/src/modules/tpm/newshixuns/Newshixuns.js b/public/react/src/modules/tpm/newshixuns/Newshixuns.js index d2ce099b4..27a78c963 100644 --- a/public/react/src/modules/tpm/newshixuns/Newshixuns.js +++ b/public/react/src/modules/tpm/newshixuns/Newshixuns.js @@ -635,16 +635,20 @@ class Newshixuns extends Component { // this.deleteAttachment(this.state.file); this.setState({ file:undefined, + deleteisnot:true, languagewrite:"", systemenvironment:"", testcoderunmode:"", + fileList:[] }) }else { this.setState({ file:undefined, + deleteisnot:true, languagewrite:"", systemenvironment:"", testcoderunmode:"", + fileList:[] }) } // this.props.showNotification('提交成功!'); @@ -676,16 +680,20 @@ class Newshixuns extends Component { // this.deleteAttachment(this.state.file); this.setState({ file:undefined, + deleteisnot:true, languagewrite:"", systemenvironment:"", testcoderunmode:"", + fileList:[] }) }else { this.setState({ file:undefined, + deleteisnot:true, languagewrite:"", systemenvironment:"", testcoderunmode:"", + fileList:[] }) } } @@ -754,7 +762,8 @@ class Newshixuns extends Component { handleChange = (info) => { console.log("handleChange1"); let fileList = info.fileList; - this.setState({ fileList:fileList, + this.setState({ + fileList:fileList, deleteisnot:false}); } onAttachmentRemove = (file) => {