From ade610d44a4d1e9aed5728126f4ab60561027737 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sat, 21 Sep 2019 16:46:28 +0800 Subject: [PATCH 01/52] =?UTF-8?q?=E8=B0=83=E6=95=B4bd?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react/src/modules/courses/shixunHomework/shixunHomework.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/shixunHomework.js b/public/react/src/modules/courses/shixunHomework/shixunHomework.js index 55dfac7fc..eb59ce6f1 100644 --- a/public/react/src/modules/courses/shixunHomework/shixunHomework.js +++ b/public/react/src/modules/courses/shixunHomework/shixunHomework.js @@ -1064,8 +1064,7 @@ class ShixunHomework extends Component{

- {/*{datas&&datas.category_name===undefined||datas&&datas.category_name===null?datas&&datas.main_category_name:datas&&datas.category_name+" 作业列表"}*/} - 实训作业 + {datas&&datas.category_name===undefined||datas&&datas.category_name===null?datas&&datas.main_category_name:datas&&datas.category_name+" 作业列表"}

  • {datas===undefined?"":datas.homeworks && datas.homeworks.length>1?this.props.isAdminOrCreator()===true?datas&&datas.category_name===undefined||datas&&datas.category_name===null? From 6c50f32a7d0097b1cb29cfeb9326f66130bf1ccc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sat, 21 Sep 2019 18:08:21 +0800 Subject: [PATCH 02/52] =?UTF-8?q?=E8=B0=83=E6=95=B4bd?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/courses/shixunHomework/Trainingjobsetting.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index bee373bd9..3534ad4ce 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -86,7 +86,7 @@ class Trainingjobsetting extends Component { latepenaltytype: false, unifiedsetting: true, allowreplenishment: undefined, - completionefficiencyscore: true, + completionefficiencyscore: false, whethertopay: false, proportion: undefined, level: undefined, @@ -1697,11 +1697,13 @@ class Trainingjobsetting extends Component { this.setState({ flagPageEditsbox:true, flagPageEdit: true, + completionefficiencyscore:true, whethertopay:whethertopays, flagPageEditstwo:releasetime, flagPageEditsthrees:deadline, flagPageEditsfor:endtime, unifiedsetting:this.state.unifiedsetting, + latedeductiontwo:20, }) if(this.state.proportion === "自定义分值"){ this.setState({ @@ -2139,7 +2141,7 @@ class Trainingjobsetting extends Component {
  • 分值 - From 3a5c1a213c7cd1e11fb4c7176a7e846b0dd4903a Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Mon, 23 Sep 2019 14:46:43 +0800 Subject: [PATCH 03/52] .. --- app/views/users/_user.json.jbuilder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/users/_user.json.jbuilder b/app/views/users/_user.json.jbuilder index 581072072..4fb05b7ba 100644 --- a/app/views/users/_user.json.jbuilder +++ b/app/views/users/_user.json.jbuilder @@ -4,5 +4,5 @@ json.name user.full_name json.grade user.grade json.identity user&.user_extension&.identity # json.email user.mail # 邮箱原则上不暴露的,如果实在需要的话只能对某些具体的接口公开 -json.image_url url_to_avatar(user) +json.image_url image_tag(url_to_avatar(user)) json.school user.school_name \ No newline at end of file From 032f86b850022eac780885ee329b5dd1c8f6b5a1 Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Mon, 23 Sep 2019 18:09:41 +0800 Subject: [PATCH 04/52] =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_user.json.jbuilder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/users/_user.json.jbuilder b/app/views/users/_user.json.jbuilder index 4fb05b7ba..581072072 100644 --- a/app/views/users/_user.json.jbuilder +++ b/app/views/users/_user.json.jbuilder @@ -4,5 +4,5 @@ json.name user.full_name json.grade user.grade json.identity user&.user_extension&.identity # json.email user.mail # 邮箱原则上不暴露的,如果实在需要的话只能对某些具体的接口公开 -json.image_url image_tag(url_to_avatar(user)) +json.image_url url_to_avatar(user) json.school user.school_name \ No newline at end of file From 7ac33f431825c19513000a048fdd588091737660 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, 24 Sep 2019 11:31:36 +0800 Subject: [PATCH 05/52] =?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/Trainingjobsetting.js | 27 ++++++++++++------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index 90fb3939b..a00065d44 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -137,7 +137,7 @@ class Trainingjobsetting extends Component { componentDidMount() { console.log("Trainingjobsetting"); console.log("componentDidMount"); - this.getTrainingjobsetting(); + this.getTrainingjobsetting(true); let query = this.props.location.pathname; const type = query.split('/'); this.setState({ @@ -165,7 +165,7 @@ class Trainingjobsetting extends Component { // } // 获取数据地方 - getTrainingjobsetting = () => { + getTrainingjobsetting = (bool) => { // console.log("getTrainingjobsetting") var homeworkid = this.props.match.params.homeworkid; // console.log(homeworkid) @@ -293,6 +293,14 @@ class Trainingjobsetting extends Component { code_review:result.data.code_review }) this.props.Getdataback(result,result.data); + + if(bool===true){ + if(this.props.isAdmin() !== undefined){ + if(this.props.isAdmin() === true){ + this.editSetting(result); + } + } + } } }) @@ -1592,7 +1600,7 @@ class Trainingjobsetting extends Component { description:result.data.message }); this.homeworkhide(); - this.getTrainingjobsetting(); + this.getTrainingjobsetting(false); } } @@ -1623,7 +1631,7 @@ class Trainingjobsetting extends Component { // message:"提示", // description:response.data.message // }); - this.getTrainingjobsetting(); + this.getTrainingjobsetting(false); this.homeworkhide() } }) @@ -1814,7 +1822,7 @@ class Trainingjobsetting extends Component { if(moment(datas.data.late_time,"YYYY-MM-DD HH:mm")<=moment()){ endtime=false; } - if(datas.data.allowreplenishment === false){ + if(result.data.allow_late === false){ whethertopays=false; } @@ -1833,11 +1841,12 @@ class Trainingjobsetting extends Component { latedeductiontwo:20, }); //均分比例 + // result.data.shixun_evaluation === 0 ? "均分比例" : result.data.shixun_evaluation === 1 ? "经验值比例" : result.data.shixun_evaluation === 2 ? try { - if(datas.data.proportion==="均分比例"){ + if(datas.data.shixun_evaluation === 0){ this.Equalproportion(20); - }else if(datas.data.proportion==="经验值比例"){ + }else if(datas.data.shixun_evaluation === 1){ this.Empiricalvalueratio(20); } @@ -1886,7 +1895,7 @@ class Trainingjobsetting extends Component { } } - if(datas.data.proportion === "自定义分值"){ + if(datas.data.shixun_evaluation === 2){ this.setState({ boolUnitetwoname:"自定义分值", boolUnitetwo: false, @@ -1920,7 +1929,7 @@ class Trainingjobsetting extends Component { unit_e_tip: "", }) this.refs.targetElementTrainingjobsetting.scrollIntoView(); - this.getTrainingjobsetting(); + this.getTrainingjobsetting(false); } rulesCheckInfo=(rules)=>{ From 48c80b6e5f524e0fd87ff9bd4203874ce89c903f 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, 24 Sep 2019 14:09:01 +0800 Subject: [PATCH 06/52] =?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/courses/shixunHomework/Trainingjobsetting.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index a00065d44..5133d1ba7 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -2403,7 +2403,7 @@ class Trainingjobsetting extends Component {

    关卡名称(需要学生完成的任务请选中)

    + className="color-grey-c font-12 ml10">(需要学生完成的任务请选中)

    {this.state.challenge_settings === undefined ? "" : this.state.challenge_settings.map((object, index) => { return ( @@ -2433,7 +2433,7 @@ class Trainingjobsetting extends Component { 按查看答案级别扣分根据学员选择查看的实训答案级别(解题思路、完整答案),扣减相应的分值 + className="color-grey-c font-14 ml15" style={{"text-align":"left"}}>(根据学员选择查看的实训答案级别(解题思路、完整答案),扣减相应的分值) 不扣分 From 212362384dc1996b991d77d5fa85c7c48e299e4a 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, 24 Sep 2019 14:42:37 +0800 Subject: [PATCH 07/52] =?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/ShixunHomeworkPage.js | 26 +++++++++++-------- public/react/src/modules/login/LoginDialog.js | 16 +++++++----- 2 files changed, 25 insertions(+), 17 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js index bb96b7cdf..cb0e98ac6 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js @@ -197,17 +197,21 @@ class ShixunHomeworkPage extends Component {
    -
    -

    - {jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.course_name} - > - {jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.category.category_name} - > - 作业详情 -

    -
    + { + jobsettingsdatapage === undefined?"": +
    +

    + {jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.course_name} + > + {jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.category.category_name} + > + 作业详情 +

    +
    + } +

    {teacherdatapage === undefined ? "" : teacherdatapage.homework_name} diff --git a/public/react/src/modules/login/LoginDialog.js b/public/react/src/modules/login/LoginDialog.js index f4f8a3f1c..2521a96d2 100644 --- a/public/react/src/modules/login/LoginDialog.js +++ b/public/react/src/modules/login/LoginDialog.js @@ -398,15 +398,19 @@ class LoginDialog extends Component { }); } handleDialogClose = () => { - - if(this.props.match===undefined){ - window.location.href="/"; - }else{ + // https://www.trustie.net/issues/24441 + // console.log(JSON.stringify(this.props)); + // console.log("handleDialogClose"); + // console.log(this.props.match); + // if(this.props.match===undefined){ + // window.location.href="/"; + // }else{ + // this.props.history.goBack(); this.setState({ isRender: false - }) + }); this.props.Modifyloginvalue(); - } + // } // this.setState({ // isRender: false // }) From a11da1841a3ddde377b2361189f6e845aa26122a 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, 24 Sep 2019 15:37:58 +0800 Subject: [PATCH 08/52] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/AppConfig.js | 20 +++---- .../modules/courses/Resource/Fileslistitem.js | 11 ++-- .../graduation/tasks/GraduateTaskItem.js | 19 ++++--- .../graduation/topics/GraduateTopicItem.js | 13 +++-- .../shixunHomework/ShixunHomeworkPage.js | 4 +- .../shixunHomework/ShixunhomeWorkItem.js | 55 +++++++++++++++---- public/react/src/modules/login/LoginDialog.js | 20 +++---- 7 files changed, 93 insertions(+), 49 deletions(-) diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index 025db7f5c..f6598a3c4 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -21,16 +21,16 @@ let hashTimeout // TODO 开发期多个身份切换 let debugType ="" -if (isDev) { - const _search = window.location.search; - let parsed = {}; - if (_search) { - parsed = queryString.parse(_search); - } - debugType = window.location.search.indexOf('debug=t') != -1 ? 'teacher' : - window.location.search.indexOf('debug=s') != -1 ? 'student' : - window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || 'admin' -} +// if (isDev) { +// const _search = window.location.search; +// let parsed = {}; +// if (_search) { +// parsed = queryString.parse(_search); +// } +// debugType = window.location.search.indexOf('debug=t') != -1 ? 'teacher' : +// window.location.search.indexOf('debug=s') != -1 ? 'student' : +// window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || 'admin' +// } window._debugType = debugType; export function initAxiosInterceptors(props) { diff --git a/public/react/src/modules/courses/Resource/Fileslistitem.js b/public/react/src/modules/courses/Resource/Fileslistitem.js index 4e8e89567..d5c4725c3 100644 --- a/public/react/src/modules/courses/Resource/Fileslistitem.js +++ b/public/react/src/modules/courses/Resource/Fileslistitem.js @@ -194,6 +194,9 @@ class Fileslistitem extends Component{ text-overflow:ellipsis; white-space:nowrap } + .fileslistitemsA{ + + } `}

    window.$(`.sourceitem${index} input`).click() }>
    this.eventStop(event)}> @@ -205,23 +208,23 @@ class Fileslistitem extends Component{ // href={"/courses/" + coursesId + "/graduation/graduation_tasks/" + categoryid + "/" + taskid + "/list"} onClick={()=>this.showfiles(discussMessage)} title={discussMessage.title} - className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.title} : "" + className=" fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.title} : "" } { this.props.isStudent? this.showfiles(discussMessage)} title={discussMessage.title} - className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.title} :"" + className=" fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.title} :"" } { this.props.isNotMember===true? discussMessage.is_lock === true ? - {discussMessage.title} + {discussMessage.title} :this.showfiles(discussMessage)} title={discussMessage.title} - className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.title}:"" + className=" fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.title}:"" } diff --git a/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js b/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js index ef16e06a4..8ab3c3628 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js @@ -211,26 +211,31 @@ class GraduateTaskItem extends Component{ text-overflow:ellipsis; white-space:nowrap } + .graduatetaskitemA{ + } `}
    { - this.props.isAdmin?{discussMessage.name}:"" + className=" fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}:"" } { - this.props.isStudent? {discussMessage.name}:"" + className=" fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}:"" } { this.props.isNotMember===true?this.props.discussMessage.private_icon===true? - {discussMessage.name} - :{discussMessage.name} + :{discussMessage.name}:"" + className=" fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}:"" } diff --git a/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js b/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js index bac04c699..dbcb0fc05 100644 --- a/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js +++ b/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js @@ -67,19 +67,24 @@ class GraduateTopicItem extends Component{ text-overflow:ellipsis; white-space:nowrap } + .GraduateTopicItemA{ + } `}
    { isNotMember? - {discussMessage.name}:"" + {discussMessage.name}:"" } { - isStudent? this.toDetailPage(`${discussMessage.id}`)} - className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}:"" + isStudent? this.toDetailPage(`${discussMessage.id}`)} + className=" fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}:"" } { - isAdmin? this.toDetailPage(`${discussMessage.id}`)} className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}:"" + isAdmin? this.toDetailPage(`${discussMessage.id}`)} className=" fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}:"" } { discussMessage.private_icon===true? diff --git a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js index cb0e98ac6..f130ce0b8 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js @@ -181,9 +181,7 @@ class ShixunHomeworkPage extends Component { const isAdmin = this.props.isAdmin(); // console.log(119) - console.log(jobsettingsdatapage); - - + // console.log(jobsettingsdatapage); return (
    { + this.setState({ + isRender:false, + }) + }; + showfiles =(url)=>{ + // console.log("ShixunhomeWorkItemshowfiles"); + // console.log( this.props.current_user.username); + try { + if(this.props.current_user.username==="游客"){ + this.setState({ + isRender:true, + match:"", + }); + return + } + }catch (e) { + } + this.props.history.push(url); + // this.props.current_user + + }; render(){ let { Modalstype, @@ -158,7 +182,7 @@ class ShixunhomeWorkItem extends Component{ startshixunCombattype, shixunsmessage, startbtn, - + isRender, } = this.state; const { checkBox, @@ -179,6 +203,12 @@ class ShixunhomeWorkItem extends Component{ cannerNavmoda={()=>this.cannerNavmoda()} /> :""} + {isRender===true?this.Modifyloginvalue()} + {...this.props} + {...this.state} + />:""} +
    {/*to={`/courses/${this.props.match.params.coursesId}/${discussMessage.homework_id}/jobsettings`}*/} { - this.props.isAdmin?{discussMessage.name}:"" + this.props.isAdmin?this.showfiles("/courses/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+discussMessage.homework_id+"/list?tab=0")} + title={discussMessage.name} + className=" fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}:"" } { - this.props.isStudent? this.showfiles(`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/list?tab=0`)} title={discussMessage.name} - className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}:"" + className=" fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}:"" } { this.props.isNotMember===true? this.props.discussMessage.private_icon===true? - {discussMessage.name} - : {discussMessage.name} + : this.showfiles(`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/list?tab=0`)} title={discussMessage.name} - className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}:"" + className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}:"" } diff --git a/public/react/src/modules/login/LoginDialog.js b/public/react/src/modules/login/LoginDialog.js index 2521a96d2..09a836a56 100644 --- a/public/react/src/modules/login/LoginDialog.js +++ b/public/react/src/modules/login/LoginDialog.js @@ -398,19 +398,19 @@ class LoginDialog extends Component { }); } handleDialogClose = () => { - // https://www.trustie.net/issues/24441 - // console.log(JSON.stringify(this.props)); - // console.log("handleDialogClose"); - // console.log(this.props.match); - // if(this.props.match===undefined){ - // window.location.href="/"; - // }else{ - // this.props.history.goBack(); + // this.setState({ + // isRender:true, + // match:"", + // }); + // 上头像上面传个""就不是undefined了 就会不隐藏了 + if(this.props.match===undefined){ + window.location.href="/"; + }else{ this.setState({ isRender: false - }); + }) this.props.Modifyloginvalue(); - // } + } // this.setState({ // isRender: false // }) From bbf04f17f2bc7a1cce39b513c98dbf866608d648 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, 24 Sep 2019 15:38:19 +0800 Subject: [PATCH 09/52] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/AppConfig.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index f6598a3c4..025db7f5c 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -21,16 +21,16 @@ let hashTimeout // TODO 开发期多个身份切换 let debugType ="" -// if (isDev) { -// const _search = window.location.search; -// let parsed = {}; -// if (_search) { -// parsed = queryString.parse(_search); -// } -// debugType = window.location.search.indexOf('debug=t') != -1 ? 'teacher' : -// window.location.search.indexOf('debug=s') != -1 ? 'student' : -// window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || 'admin' -// } +if (isDev) { + const _search = window.location.search; + let parsed = {}; + if (_search) { + parsed = queryString.parse(_search); + } + debugType = window.location.search.indexOf('debug=t') != -1 ? 'teacher' : + window.location.search.indexOf('debug=s') != -1 ? 'student' : + window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || 'admin' +} window._debugType = debugType; export function initAxiosInterceptors(props) { From d9716703f0f649fad2fc4e2555d6a335350c7c25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Tue, 24 Sep 2019 15:57:33 +0800 Subject: [PATCH 10/52] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/courses/Index.js | 1 - .../courses/coursesDetail/CoursesLeftNav.js | 173 ++++++------------ .../courses/exercise/ExerciseListItem.js | 8 +- .../graduation/tasks/GraduateTaskItem.js | 4 +- .../src/modules/courses/poll/PollListItem.js | 2 +- .../react/src/modules/message/js/MessagSub.js | 4 +- 6 files changed, 64 insertions(+), 128 deletions(-) diff --git a/public/react/src/modules/courses/Index.js b/public/react/src/modules/courses/Index.js index f9f80a9da..c414df55a 100644 --- a/public/react/src/modules/courses/Index.js +++ b/public/react/src/modules/courses/Index.js @@ -299,7 +299,6 @@ class CoursesIndex extends Component{ this.historyArray = [window.location.pathname]; this.props.history.listen( location => { - console.log(location); this.historyArray.unshift(window.location.pathname); this.historyArray.length = 2; //Do your stuff here diff --git a/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js b/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js index 35b06f305..e50ec56e6 100644 --- a/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js +++ b/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js @@ -181,7 +181,7 @@ class Coursesleftnav extends Component{ on('editshixunname',this.editshixunchild) on('editshixunmainname',this.editshixunmainname) - this.props.updataleftNavfun(); + // this.props.updataleftNavfun(); // this.props.getleftNavid && this.props.getleftNavid("shixun_homework"); // const position =parseInt(this.props.match.params.position); @@ -239,50 +239,52 @@ class Coursesleftnav extends Component{ setnavid=(e,key,id,type,url)=>{ // this.props.getleftNavid && this.props.getleftNavid(key,type); - let {selectnavid,navid}=this.state; - - if(navidtype===true&&selectnavid===false){ - - if(navid===key){ - this.setState({ - navid:"", - selectnavid:false, - newselectnavid:id - }) - }else{ - this.setState({ - navid:key, - positiontype:type, - selectnavid:false, - newselectnavid:id - }) - } - }else{ - // console.log(navidtype) - // console.log(selectnavid) - this.setState({ - navid:"", - selectnavid:false, - newselectnavid:id - }) - } - this.props.updataleftNavfun(); - this.props.history.replace( url ); - e.stopPropagation();//阻止冒泡 + // let {selectnavid,navid}=this.state; + // + // if(navidtype===true&&selectnavid===false){ + // + // if(navid===key){ + // this.setState({ + // navid:"", + // selectnavid:false, + // newselectnavid:id + // }) + // }else{ + // this.setState({ + // navid:key, + // positiontype:type, + // selectnavid:false, + // newselectnavid:id + // }) + // } + // }else{ + // // console.log(navidtype) + // // console.log(selectnavid) + // this.setState({ + // navid:"", + // selectnavid:false, + // newselectnavid:id + // }) + // } + // + // this.props.updataleftNavfun(); + // this.props.history.replace( url ); + // e.stopPropagation();//阻止冒泡 + this.selectnavid(e,key,id,type,url) } selectnavid=(e,key,id,type,urls,index)=>{ let {url}=this.state; if(urls!=url){ - + this.props.updataleftNavfun(); this.props.history.replace(urls); - this.props.updataleftNavfun(); }else{ if (key === this.props.indexs) { this.props.unlocationNavfun(undefined) } else { + this.props.updataleftNavfun(); this.props.unlocationNavfun(key) this.props.history.replace(urls); } @@ -304,8 +306,9 @@ class Coursesleftnav extends Component{ url:urls, indexs:index }) + this.props.updataleftNavfun(); this.props.history.replace(urls); - this.props.updataleftNavfun(); + } @@ -721,24 +724,27 @@ class Coursesleftnav extends Component{ e.stopPropagation();//阻止冒泡 } - showsandians=(e,key,urls,num)=> { + showsandians=(e,key,urls,num,id,type,index)=> { let {url}=this.state; if (key === this.props.indexs) { this.props.unlocationNavfun(undefined) this.props.history.replace(urls); } else { + this.props.updataleftNavfun(); this.props.unlocationNavfun(key) this.props.history.replace(urls); } if(urls!=url){ + this.props.updataleftNavfun(); this.props.history.replace(urls); } - // if(this.props.indexs===undefined){ - // - // }else{ - // - // } + this.setState({ + selectnavid:true, + newselectnavid:id, + url:urls, + indexs:index + }) } maincontent=(item,key)=>{ @@ -930,8 +936,8 @@ class Coursesleftnav extends Component{ return(
    -
  • this.showsandians(e,key,item.category_url,1)} className={this.props.mainurl===item.category_url&&key===this.props.indexs?"liactive":"clearfix active"} onMouseLeave={(e)=>this.hidesandian(e,key)} onMouseEnter={(e)=>this.showsandian(e,key)}> - this.showsandians(e,key,item.category_url,1)} className={ item.second_category===undefined?"fl ml20 pd0":item.second_category.length===0?"fl ml20 pd0":this.state.sandiantypes===key?"fl ml20 pd0 ebebeb":"fl ml20 pd0"}> +
  • this.showsandians(e,key,item.category_url,1,item.id,item.type)} className={this.props.mainurl===item.category_url?"liactive":"clearfix active"} onMouseLeave={(e)=>this.hidesandian(e,key)} onMouseEnter={(e)=>this.showsandian(e,key)}> + this.showsandians(e,key,item.category_url,1,item.id,item.type)} className={ item.second_category===undefined?"fl ml20 pd0":item.second_category.length===0?"fl ml20 pd0":this.state.sandiantypes===key?"fl ml20 pd0 ebebeb":"fl ml20 pd0"}> { item.type==="announcement"?: item.type==="online_learning"?: @@ -976,7 +982,7 @@ class Coursesleftnav extends Component{ ref={provided.innerRef} {...provided.droppableProps} className={"droppableul"} - style={{display: this.props.mainurl===item.category_url&&key===this.props.indexs?"":"none"}} + style={{display: key===this.props.indexs?"":"none"}} > {item.second_category===undefined?"":item.second_category.map((iem,index)=>{ if(item.type==="course_group"){ @@ -1039,12 +1045,15 @@ class Coursesleftnav extends Component{ }) : course_modules===undefined?"":course_modules.map((item,key)=>{ - + if(key===this.props.indexs){ + console.log(key) + console.log(this.props.indexs) + } return(
  • this.setnavid(e,key,item.id,item.type,item.category_url)} onMouseEnter={(e)=>this.showsandian(e,key)} title={item.name.length<7?"":item.name} > @@ -1069,11 +1078,8 @@ class Coursesleftnav extends Component{
  • - {/**/} - {/*下拉列表*/} - {/* className={this.props.location.pathname===item.category_url||this.props.location.pathname===this.state.url&&key===this.state.indexs?"":""}*/} -
      +
        { item.second_category===undefined?"":item.second_category.map((iem,index)=>{ @@ -1115,72 +1121,3 @@ class Coursesleftnav extends Component{ export default Coursesleftnav; -// -// sandianshow=(e,key)=>{ -// this.setState({ -// sandiantype:key -// }) -// e.stopPropagation();//阻止冒泡 -// } -// hidesandian=(e,key)=>{ -// this.setState({ -// sandiantypes:undefined -// }) -// e.stopPropagation();//阻止冒泡 -// } -// sandianshow=(e,key)=>{ -// this.setState({ -// sandiantype:key -// }) -// e.stopPropagation();//阻止冒泡 -// } - - -// sandianhide=(e)=>{ -// this.setState({ -// sandiantype:undefined, -// -// }) -// e.stopPropagation();//阻止冒泡 -// } -// twosandianshows=(e,key,type)=>{ -// -// this.setState({ -// twosandiantypenum:key, -// toopvisible:false, -// toopvisibleindex:undefined, -// twosandiantypes:type -// }) -// e.stopPropagation();//阻止冒泡 -// } -// twoMouseLeave=(e)=>{ -// this.setState({ -// toopvisible:false, -// }) -// e.stopPropagation();//阻止冒泡 -// } - - -{/*{ is_teacher===true?*/} -{/*
        */} -{/*
      • */} -{/* */} -{/* */} -{/*
        确定
        */} -{/*
        */} -{/*
      • */} -{/*
        :""}*/} - - -{/*{ is_teacher===true?
        */} -{/* */} -{/* {hidden_modules.length===0?"":hidden_modules.map((list,key)=>{*/} -{/* return(*/} -{/*
      • */} -{/* */} -{/* {list.name}*/} -{/*
      • */} -{/* )*/} -{/* })}*/} -{/*
        */} -{/*
        :""}*/} \ No newline at end of file diff --git a/public/react/src/modules/courses/exercise/ExerciseListItem.js b/public/react/src/modules/courses/exercise/ExerciseListItem.js index f61a7852b..750b9eb19 100644 --- a/public/react/src/modules/courses/exercise/ExerciseListItem.js +++ b/public/react/src/modules/courses/exercise/ExerciseListItem.js @@ -150,13 +150,13 @@ class ExerciseListItem extends Component{ { item.exercise_status ===2? - {item.exercise_left_time} + {"提交剩余时间:"+item.exercise_left_time} :"" } - { - item.exercise_status ===3? + { + item.exercise_left_time===null?"":item.exercise_status ===3? - {item.exercise_left_time} + {"截止剩余时间:"+item.exercise_left_time} :"" } {/*{*/} diff --git a/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js b/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js index ef16e06a4..50b24d7ac 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js @@ -256,8 +256,8 @@ class GraduateTaskItem extends Component{ {discussMessage.commit_count===undefined?"":{discussMessage.commit_count} 已交} {discussMessage.uncommit_count===undefined?"":{discussMessage.uncommit_count} 未交} {/*{discussMessage.replies_count} 3 未评*/} - - {discussMessage.status_time} + + {discussMessage.task_status===1?"提交剩余时间:"+discussMessage.status_time:discussMessage.task_status===2?"补交剩余时间:"+discussMessage.status_time:"交叉评阅剩余时间:"+discussMessage.status_time} {/* { discussMessage.replies_count != 0 && {discussMessage.replies_count} 回复 } diff --git a/public/react/src/modules/courses/poll/PollListItem.js b/public/react/src/modules/courses/poll/PollListItem.js index 5e9db1442..359ef872c 100644 --- a/public/react/src/modules/courses/poll/PollListItem.js +++ b/public/react/src/modules/courses/poll/PollListItem.js @@ -73,7 +73,7 @@ class PollListItem extends Component{ { item.polls_status ==2 && item.publish_time !=null && - {formatDuring(t)} + {"提交剩余时间:"+formatDuring(t)} } { diff --git a/public/react/src/modules/message/js/MessagSub.js b/public/react/src/modules/message/js/MessagSub.js index 73b791ece..41fc89dbd 100644 --- a/public/react/src/modules/message/js/MessagSub.js +++ b/public/react/src/modules/message/js/MessagSub.js @@ -514,8 +514,8 @@ class MessagSub extends Component {
      • this.getdata("project", 1)}>项目提醒
      • -
      • this.getdata("project_package", 1)}>众包提醒
      • + {/*
      • this.getdata("project_package", 1)}>众包提醒
      • */}
      • this.getdata("interaction", 1)}>互动提醒
      • From 56665203d5bc9884b6d75304984fc057a579feb9 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, 24 Sep 2019 16:11:24 +0800 Subject: [PATCH 11/52] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/AppConfig.js | 22 ++++----- .../courses/busyWork/CommonWorkItem.js | 41 +++++++++++++++-- .../graduation/tasks/GraduateTaskItem.js | 45 +++++++++++++++---- .../modules/courses/graduation/tasks/index.js | 2 + .../graduation/topics/GraduateTopicItem.js | 37 +++++++++++++-- 5 files changed, 120 insertions(+), 27 deletions(-) diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index 025db7f5c..48e47edbe 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -21,16 +21,16 @@ let hashTimeout // TODO 开发期多个身份切换 let debugType ="" -if (isDev) { - const _search = window.location.search; - let parsed = {}; - if (_search) { - parsed = queryString.parse(_search); - } - debugType = window.location.search.indexOf('debug=t') != -1 ? 'teacher' : - window.location.search.indexOf('debug=s') != -1 ? 'student' : - window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || 'admin' -} +// if (isDev) { +// const _search = window.location.search; +// let parsed = {}; +// if (_search) { +// parsed = queryString.parse(_search); +// } +// debugType = window.location.search.indexOf('debug=t') != -1 ? 'teacher' : +// window.location.search.indexOf('debug=s') != -1 ? 'student' : +// window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || 'admin' +// } window._debugType = debugType; export function initAxiosInterceptors(props) { @@ -44,7 +44,7 @@ export function initAxiosInterceptors(props) { // proxy = "https://testeduplus2.educoder.net" //proxy="http://47.96.87.25:48080" proxy="https://pre-newweb.educoder.net" - proxy="https://test-newweb.educoder.net" + // proxy="https://test-newweb.educoder.net" // 在这里使用requestMap控制,避免用户通过双击等操作发出重复的请求; // 如果需要支持重复的请求,考虑config里面自定义一个allowRepeat参考来控制 diff --git a/public/react/src/modules/courses/busyWork/CommonWorkItem.js b/public/react/src/modules/courses/busyWork/CommonWorkItem.js index 122ed12d2..27b168b72 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkItem.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkItem.js @@ -7,22 +7,41 @@ import CoursesListType from '../coursesPublic/CoursesListType' import { WordsBtn } from 'educoder' import AccessoryModal2 from '../coursesPublic/AccessoryModal2' import AccessoryModal from '../coursesPublic/AccessoryModal' +import LoginDialog from '../../login/LoginDialog'; import axios from 'axios' class CommonWorkItem extends Component{ constructor(props){ super(props); this.state = { - aModalVisible: false + aModalVisible: false, + isRender:false, } } onItemClick = (item) => { + // console.log("onItemClick"); + // console.log(this.props); + try { + if(this.props.current_user.username==="游客"){ + this.setState({ + isRender:true, + match:"", + }); + return + } + }catch (e) { + } const isStudent = this.props.isStudent() if (isStudent) { this.props.toWorkQuestionPage(this.props.match.params, item.homework_id) } else { this.props.toWorkListPage(this.props.match.params, item.homework_id) } - } + }; + Modifyloginvalue=()=>{ + this.setState({ + isRender:false, + }) + }; sendMoreAttachment = (item) => { this.handleItem = item; const url = `/student_works/${item.work_id}/supply_attachments.json` @@ -104,7 +123,7 @@ class CommonWorkItem extends Component{ render(){ let { mainList,workType }=this.props; - const { aModalVisible, fileList, revise_reason } = this.state + const { aModalVisible, fileList, revise_reason,isRender } = this.state let coursesId = this.props.match.params.coursesId; const isStudent = this.props.isStudent() @@ -119,6 +138,11 @@ class CommonWorkItem extends Component{ fileList={fileList} description={revise_reason} > */} + {isRender===true?this.Modifyloginvalue()} + {...this.props} + {...this.state} + />:""} @@ -144,6 +171,14 @@ class CommonWorkItem extends Component{ }
        this.props.onItemClick(Object.assign({}, item, {id: item.homework_id})) }>

        + {} : () => this.onItemClick(item)} diff --git a/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js b/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js index 8ab3c3628..44c9be848 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js @@ -7,14 +7,15 @@ import axios from 'axios'; import Modals from '../../../modals/Modals'; import Associationmodel from '../../coursesPublic/Associationmodel'; import AccessoryModal from "../../coursesPublic/AccessoryModal"; - +import LoginDialog from "../../../login/LoginDialog"; class GraduateTaskItem extends Component{ constructor(props){ super(props); this.state = { modalname:"关联项目", - visible:false + visible:false, + isRender:false, } } @@ -32,6 +33,11 @@ class GraduateTaskItem extends Component{ // isrelate:is_relate // }) } + Modifyloginvalue=()=>{ + this.setState({ + isRender:false, + }) + }; cannelAssociation=()=>{ @@ -132,7 +138,24 @@ class GraduateTaskItem extends Component{ setupdate=()=>{ this.props.funlist - } + }; + showfiles =(url)=>{ + // console.log("ShixunhomeWorkItemshowfiles"); + // console.log( this.props.current_user.username); + try { + if(this.props.current_user.username==="游客"){ + this.setState({ + isRender:true, + match:"", + }); + return + } + }catch (e) { + } + this.props.history.push(url); + // this.props.current_user + + }; render(){ let { Modalstype, @@ -142,7 +165,8 @@ class GraduateTaskItem extends Component{ cardsModalsavetype, loadtype, modalname, - visible + visible, + isRender } = this.state; const { checkBox, @@ -165,7 +189,11 @@ class GraduateTaskItem extends Component{ modalSave={cardsModalsavetype} loadtype={loadtype} /> - + {isRender===true?this.Modifyloginvalue()} + {...this.props} + {...this.state} + />:""} {visible===true?this.showfiles("/courses/"+coursesId+"/graduation_tasks/"+categoryid+"/detail/"+taskid+"/list")} title={discussMessage.name} className=" fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}:"" } { this.props.isStudent? this.showfiles("/courses/"+coursesId+"/graduation_tasks/"+categoryid+"/detail/"+taskid+"/list")} title={discussMessage.name} className=" fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}:"" } @@ -232,8 +260,7 @@ class GraduateTaskItem extends Component{ { this.props.isNotMember===true?this.props.discussMessage.private_icon===true? {discussMessage.name} - :this.showfiles("/courses/"+coursesId+"/graduation_tasks/"+categoryid+"/"+taskid+"/list")} title={discussMessage.name} className=" fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}:"" } diff --git a/public/react/src/modules/courses/graduation/tasks/index.js b/public/react/src/modules/courses/graduation/tasks/index.js index ae764cc95..4a7ee9710 100644 --- a/public/react/src/modules/courses/graduation/tasks/index.js +++ b/public/react/src/modules/courses/graduation/tasks/index.js @@ -744,6 +744,8 @@ class GraduationTasks extends Component{

        { + editTopic=(topicId)=>{ + let courseId=this.props.match.params.coursesId; this.props.history.push(`/courses/${courseId}/graduation_topics/${topicId}/edit`); } toDetailPage=(topicId)=>{ + // console.log("toDetailPage"); + // console.log(this.props); + try { + if(this.props.current_user.username==="游客"){ + this.setState({ + isRender:true, + match:"", + }); + return + } + }catch (e) { + } let courseId=this.props.match.params.coursesId; this.props.history.push(`/courses/${courseId}/graduation_topics/${topicId}/detail`); - } + }; + Modifyloginvalue=()=>{ + this.setState({ + isRender:false, + }) + }; render(){ const { checkBox, discussMessage, index,chooseTopic, data, courseId } = this.props; - + const { + isRender + }=this.state; const isAdmin = this.props.isAdmin(); const isStudent=this.props.isStudent(); const isNotMember=this.props.isNotMember(); @@ -32,6 +56,11 @@ class GraduateTopicItem extends Component{ } return(
        + {isRender===true?this.Modifyloginvalue()} + {...this.props} + {...this.state} + />:""}
        From 638d76ac27bf91c17c2c9eacc5f57710d71b857e 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, 24 Sep 2019 16:34:09 +0800 Subject: [PATCH 12/52] =?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/exercise/ExerciseListItem.js | 47 ++++++++++++++++--- .../graduation/topics/GraduateTopicItem.js | 1 + .../src/modules/courses/poll/PollListItem.js | 38 ++++++++++++++- 3 files changed, 78 insertions(+), 8 deletions(-) diff --git a/public/react/src/modules/courses/exercise/ExerciseListItem.js b/public/react/src/modules/courses/exercise/ExerciseListItem.js index f61a7852b..1585b61ba 100644 --- a/public/react/src/modules/courses/exercise/ExerciseListItem.js +++ b/public/react/src/modules/courses/exercise/ExerciseListItem.js @@ -10,14 +10,15 @@ import { formatDuring ,handleDateString} from 'educoder'; import '../css/members.css'; import '../css/busyWork.css'; import CourseLayoutcomponent from "./Exercise"; - +import LoginDialog from '../../login/LoginDialog'; const dataformat="YYYY-MM-DD HH:mm"; const polls_status={1:"未发布",2:"提交中",3:"已截止",4:"已结束"} class ExerciseListItem extends Component{ constructor(props){ super(props); this.state={ - Modalstype:false + Modalstype:false, + isRender:false, } } @@ -40,7 +41,30 @@ class ExerciseListItem extends Component{ }) } + }; + Modifyloginvalue=()=>{ + this.setState({ + isRender:false, + }) + }; + + showfiles =(url)=>{ + // console.log("ShixunhomeWorkItemshowfiles"); + // console.log( this.props.current_user.username); + try { + if(this.props.current_user.username==="游客"){ + this.setState({ + isRender:true, + match:"", + }); + return + } + }catch (e) { } + this.props.history.push(url); + // this.props.current_user + + }; cancelmodel=()=>{ this.setState({ @@ -52,6 +76,7 @@ class ExerciseListItem extends Component{ }) } render(){ + let {isRender}=this.state; let{item,checkBox,index}=this.props; let {coursesId,Id}=this.props.match.params const IsAdmin =this.props.isAdmin(); @@ -76,6 +101,11 @@ class ExerciseListItem extends Component{ modalSave={this.state.ModalSave} antIcon={this.state.Modalstypeloding} >:""} + {isRender===true?this.Modifyloginvalue()} + {...this.props} + {...this.state} + />:""} + } +
        {/*发布设置*/}
        @@ -2155,7 +2172,7 @@ class Trainingjobsetting extends Component {
        发布时间: -
        +
        截止时间: -
        +
        - @@ -2269,8 +2286,21 @@ class Trainingjobsetting extends Component { (延时提交作品时,学生成绩将被扣减的分值) {/*{latepenaltytype===true?
        :""}*/}
        - -
        + { + whethertopay&& whethertopay === true ? + + :"" + } +
        结束时间: From 65b6b01ce24eb5d5fb97c1e648108bc655b0fcf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Tue, 24 Sep 2019 17:29:01 +0800 Subject: [PATCH 16/52] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/paths/PathDetail/DetailCards.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/paths/PathDetail/DetailCards.js b/public/react/src/modules/paths/PathDetail/DetailCards.js index d77b35888..57e79ee07 100644 --- a/public/react/src/modules/paths/PathDetail/DetailCards.js +++ b/public/react/src/modules/paths/PathDetail/DetailCards.js @@ -495,7 +495,7 @@ class DetailCards extends Component{ :
      • { - showparagraphkey===key&&showparagraphindex===index?this.props.detailInfoList&&this.props.detailInfoList.allow_statistics===false&&this.props.MenuItemsindextype===2?"":
        + showparagraphkey===key&&showparagraphindex===index?this.props.detailInfoList&&this.props.detailInfoList.allow_statistics===false&&this.props.courses!=undefined?""::"" From 0a3192628f69c9269b3c71ea42fe53422e88975f Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Tue, 24 Sep 2019 17:34:34 +0800 Subject: [PATCH 17/52] window.setTimeout --- public/react/src/modules/user/account/ChangeHeaderPicModal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/user/account/ChangeHeaderPicModal.js b/public/react/src/modules/user/account/ChangeHeaderPicModal.js index 76a1a2ebe..197e84a5c 100644 --- a/public/react/src/modules/user/account/ChangeHeaderPicModal.js +++ b/public/react/src/modules/user/account/ChangeHeaderPicModal.js @@ -109,7 +109,7 @@ class ChangeHeaderPicModal extends Component{ // https://www.trustie.net/issues/22461 if ( this.props.current_user.image_url.indexOf('avatars/User/b') != -1 || this.props.current_user.image_url.indexOf('avatars/User/g') != -1 ) { - this.setTimeout(() => { + window.setTimeout(() => { this.doAfterUpdated() }, 1000) } else { From 274910d0a9e894cf0de78b5c64625ec6ce72edc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Tue, 24 Sep 2019 17:39:17 +0800 Subject: [PATCH 18/52] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/paths/PathDetail/DetailCards.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/paths/PathDetail/DetailCards.js b/public/react/src/modules/paths/PathDetail/DetailCards.js index 57e79ee07..3ab41338b 100644 --- a/public/react/src/modules/paths/PathDetail/DetailCards.js +++ b/public/react/src/modules/paths/PathDetail/DetailCards.js @@ -336,7 +336,7 @@ class DetailCards extends Component{ showparagraphindex }=this.state; const antIcon = ; - // console.log("zzz"+this.props.MenuItemsindextype) + // console.log(this.props.current_user&&this.props.current_user.user_identity==="学生") return(
        {AccountProfiletype===true? { - showparagraphkey===key&&showparagraphindex===index?this.props.detailInfoList&&this.props.detailInfoList.allow_statistics===false&&this.props.courses!=undefined?"":
        + showparagraphkey===key&&showparagraphindex===index?this.props.detailInfoList&&this.props.detailInfoList.allow_statistics===false&&this.props.current_user&&this.props.current_user.user_identity==="学生"?""::"" From 61dad66bfb7536bfad6e745b98ff44ea8702bfc5 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Tue, 24 Sep 2019 18:05:11 +0800 Subject: [PATCH 19/52] this.state.description != '' --- public/react/src/modules/courses/busyWork/NewWorkForm.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/busyWork/NewWorkForm.js b/public/react/src/modules/courses/busyWork/NewWorkForm.js index c52350c78..81851d2f2 100644 --- a/public/react/src/modules/courses/busyWork/NewWorkForm.js +++ b/public/react/src/modules/courses/busyWork/NewWorkForm.js @@ -323,7 +323,7 @@ class NewWorkForm extends Component{ const courseId = this.state.course_id || this.props.match.params.coursesId ; this.isEdit = this.isEdit || this.props.match.url.indexOf('/edit') != -1 - if ((this.isEdit) && !this.state.description) { + if ((this.isEdit) && !this.state.description && this.state.description != '') { return '' } const uploadProps = { From 6b6aff953f3778402a3db2154e80583426b1031a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Tue, 24 Sep 2019 18:08:07 +0800 Subject: [PATCH 20/52] Merge branches 'dev_aliyun' and 'develop' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun # Conflicts: # public/react/src/modules/paths/PathDetail/DetailCards.js --- public/react/src/modules/paths/PathDetail/DetailCards.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/paths/PathDetail/DetailCards.js b/public/react/src/modules/paths/PathDetail/DetailCards.js index 57e79ee07..46e5fe051 100644 --- a/public/react/src/modules/paths/PathDetail/DetailCards.js +++ b/public/react/src/modules/paths/PathDetail/DetailCards.js @@ -495,7 +495,7 @@ class DetailCards extends Component{ :
      • { - showparagraphkey===key&&showparagraphindex===index?this.props.detailInfoList&&this.props.detailInfoList.allow_statistics===false&&this.props.courses!=undefined?"":
        + showparagraphkey===key&&showparagraphindex===index?this.props.detailInfoList&&this.props.detailInfoList.allow_statistics===false&&this.props.current_user&&this.props.current_user.user_identity==="学生"?""::"" From 54c2428c44c7bc556642a3c82f9b93deaa78ba2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Tue, 24 Sep 2019 18:19:28 +0800 Subject: [PATCH 21/52] Merge branches 'dev_aliyun' and 'develop' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun # Conflicts: # public/react/src/modules/paths/PathDetail/DetailCards.js --- public/react/src/modules/paths/PathDetail/DetailCards.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/paths/PathDetail/DetailCards.js b/public/react/src/modules/paths/PathDetail/DetailCards.js index 46e5fe051..bd42af623 100644 --- a/public/react/src/modules/paths/PathDetail/DetailCards.js +++ b/public/react/src/modules/paths/PathDetail/DetailCards.js @@ -495,7 +495,7 @@ class DetailCards extends Component{ :
      • { - showparagraphkey===key&&showparagraphindex===index?this.props.detailInfoList&&this.props.detailInfoList.allow_statistics===false&&this.props.current_user&&this.props.current_user.user_identity==="学生"?"":
        + showparagraphkey===key&&showparagraphindex===index?this.props.detailInfoList&&this.props.detailInfoList.allow_statistics===false&&this.props.current_user&&this.props.current_user.user_identity==="学生"&&this.props.courses!=undefined?""::"" From a2f35053457acf6a6e0a812215fdaef2c390f762 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Tue, 24 Sep 2019 18:31:49 +0800 Subject: [PATCH 22/52] =?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/courses/graduation/tasks/GraduateTaskItem.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js b/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js index 50b24d7ac..1a0952a95 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js @@ -256,8 +256,8 @@ class GraduateTaskItem extends Component{ {discussMessage.commit_count===undefined?"":{discussMessage.commit_count} 已交} {discussMessage.uncommit_count===undefined?"":{discussMessage.uncommit_count} 未交} {/*{discussMessage.replies_count} 3 未评*/} - - {discussMessage.task_status===1?"提交剩余时间:"+discussMessage.status_time:discussMessage.task_status===2?"补交剩余时间:"+discussMessage.status_time:"交叉评阅剩余时间:"+discussMessage.status_time} + + {discussMessage.task_status===1&&discussMessage.status_time!=""&&discussMessage.status_time!=null?"提交剩余时间:"+discussMessage.status_time:discussMessage.task_status===2&&discussMessage.status_time!=""&&discussMessage.status_time!=null?"补交剩余时间:"+discussMessage.status_time:discussMessage.task_status===3&&discussMessage.status_time!=""&&discussMessage.status_time!=null?"交叉评阅剩余时间:"+discussMessage.status_time:discussMessage.status_time} {/* { discussMessage.replies_count != 0 && {discussMessage.replies_count} 回复 } From 04b2aecf3e830fde0f5f883fc909f97081a8bb11 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, 25 Sep 2019 09:20:50 +0800 Subject: [PATCH 23/52] =?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/courses/shixunHomework/Trainingjobsetting.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index a00065d44..e0e26577e 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -297,7 +297,7 @@ class Trainingjobsetting extends Component { if(bool===true){ if(this.props.isAdmin() !== undefined){ if(this.props.isAdmin() === true){ - this.editSetting(result); + this.editSettings(result); } } } @@ -1822,7 +1822,7 @@ class Trainingjobsetting extends Component { if(moment(datas.data.late_time,"YYYY-MM-DD HH:mm")<=moment()){ endtime=false; } - if(result.data.allow_late === false){ + if(datas.data.allow_late === false){ whethertopays=false; } From 83441e380421bbda1eee55362ae4621aa111f14b 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, 25 Sep 2019 09:30:38 +0800 Subject: [PATCH 24/52] =?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 | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js index 0469d5d9c..184895428 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js @@ -40,7 +40,7 @@ class GraduationTaskssettinglist extends Component{ task_status:undefined, cross_comment:null, search:null, - order:"updated_at", + order:"update_time", b_order:"desc", course_group:undefined, loadingstate:true, @@ -92,6 +92,7 @@ class GraduationTaskssettinglist extends Component{ seacthdata=(teacher_comment,task_status,course_group,cross_comment,order,b_order,search,pages)=>{ let{page,limit}=this.state; + // console.log(teacher_comment,task_status,course_group,cross_comment,order,b_order,search) let task_Id=this.props.match.params.task_Id; let url="/graduation_tasks/"+task_Id+"/tasks_list.json"; @@ -106,7 +107,7 @@ class GraduationTaskssettinglist extends Component{ order:order===null?undefined:order, b_order:b_order===null?undefined:b_order, search:search===null?undefined:search, - page:pages===null?undefined:page, + page:pages, limit:20, }, paramsSerializer: function(params) { @@ -281,8 +282,6 @@ class GraduationTaskssettinglist extends Component{ funtaskstatus=(checkedValues,key)=>{ // console.log(checkedValues) - console.log(checkedValues); - let {teacher_comment, course_group, cross_comment, order, b_order, search} = this.state; @@ -599,7 +598,7 @@ class GraduationTaskssettinglist extends Component{ this.cannerassocition(); let {taskslistdata}=this.state; let url = "/graduation_tasks/"+taskslistdata.task_id+"/graduation_works/cancel_relate_project.json"; - console.log(url) + axios.get(url).then((result)=>{ if(result.data.status===0){ @@ -655,8 +654,7 @@ class GraduationTaskssettinglist extends Component{ /// 确认是否下载 confirmysl(url){ - debugger; - console.log(1); + let {teacher_comment, task_status, course_group, cross_comment, order, b_order, search,page} =this.state; let params ={ @@ -958,7 +956,7 @@ class GraduationTaskssettinglist extends Component{ } - console.log(this.props.questionslist.status) + return( @@ -1221,10 +1219,10 @@ class GraduationTaskssettinglist extends Component{ {this.props.isAdmin()===true?

        - {order==="updated_at"?"更新时间":order==="work_score"?"最终成绩":order==="student_id"?"学生学号":""}排序 + {order==="update_time"?"更新时间":order==="work_score"?"最终成绩":order==="student_id"?"学生学号":""}排序

          -
        • this.funorder("updated_at")}>更新时间 +
        • this.funorder("update_time")}>更新时间
        • this.funorder("work_score" )}>最终成绩
        • @@ -1415,10 +1413,10 @@ class GraduationTaskssettinglist extends Component{

          - {order==="updated_at"?"时间":order==="work_score"?"成绩":order==="student_id"?"学号":""}排序

            -
          • this.funorder("updated_at")} className={order==="updated_at"?"none":""}>时间 +
          • this.funorder("update_time")} className={order==="update_time"?"none":""}>时间
          • this.funorder("work_score" )} className={order==="work_score"?"none":""}>成绩
          • From 7d10f6b241e14e47121957e95da3ad84a742a39b Mon Sep 17 00:00:00 2001 From: p31729568 Date: Wed, 25 Sep 2019 09:44:39 +0800 Subject: [PATCH 25/52] ecs: fix --- app/controllers/ecs/reach_evaluations_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/ecs/reach_evaluations_controller.rb b/app/controllers/ecs/reach_evaluations_controller.rb index 25ac24656..41ea0d52c 100644 --- a/app/controllers/ecs/reach_evaluations_controller.rb +++ b/app/controllers/ecs/reach_evaluations_controller.rb @@ -1,7 +1,7 @@ class Ecs::ReachEvaluationsController < Ecs::BaseController def show - preload = { ec_graduation_subitems: { ec_course_support: [:ec_course, :ec_graduation_requirement_calculation] } } + preload = { ec_graduation_subitems: { ec_course_supports: [:ec_course, :ec_graduation_requirement_calculation] } } @graduation_requirements = current_year.ec_graduation_requirements.includes(preload) respond_to do |format| From 58f8fd0f06ae9f6d8d83b3bf2b4d1431b0125f86 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, 25 Sep 2019 09:49:34 +0800 Subject: [PATCH 26/52] =?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 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js index a7f886d78..830525af2 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js @@ -1169,9 +1169,11 @@ class GraduationTaskssettingapp extends Component{
            评分设置
            最终成绩组成 (取各教师最终评分的平均分)
            - 启用交叉评阅 (给老师分配其他指导老师的学生作品) - + + 启用交叉评阅 (给老师分配其他指导老师的学生作品) + + {crosscomment===true?
            开始时间: From 46cd5f6c731d3d945c095779b898d0b6af512c18 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, 25 Sep 2019 09:59:25 +0800 Subject: [PATCH 27/52] =?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/Trainingjobsetting.js | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index 391785b83..c71b1ffc9 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -241,26 +241,26 @@ class Trainingjobsetting extends Component { } } } - console.log("220"); + // console.log("220"); var publish_timebools=false; if(result.data.publish_time){ publish_timebools= moment(result.data.publish_time,"YYYY-MM-DD HH:mm")<=moment(); } - console.log("228"); - console.log(publish_timebools); + // console.log("228"); + // console.log(publish_timebools); var end_timebools =false; if(result.data.end_time){ end_timebools == moment(result.data.end_time,"YYYY-MM-DD HH:mm")<=moment(); } - console.log("233"); - console.log(end_timebools); + // console.log("233"); + // console.log(end_timebools); var late_timess=false; if(result.data.late_time){ late_timess== moment(result.data.end_time,"YYYY-MM-DD HH:mm")<=moment(); } - console.log("240"); - console.log(late_timess); + // console.log("240"); + // console.log(late_timess); this.setState({ @@ -1805,6 +1805,7 @@ class Trainingjobsetting extends Component { modalSave: this.cancelBox }) } else { + // debugger var releasetime =true; var deadline = true; var endtime =true; @@ -1851,6 +1852,9 @@ class Trainingjobsetting extends Component { } }catch (e) { + console.log(1); + console.log(e); + } @@ -1875,6 +1879,8 @@ class Trainingjobsetting extends Component { } } }catch (e) { + console.log(2); + console.log(e); this.setState({ flagPageEditsbox:true, flagPageEdit: true, @@ -1905,9 +1911,10 @@ class Trainingjobsetting extends Component { } } catch (e) { - + console.log(3); + console.log(e); } - } + }; //取消编辑 cancelEdit = () => { this.setState({ From cfd08fe1d89a88059969fbb8f95bae6c0a668d3a 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, 25 Sep 2019 10:00:22 +0800 Subject: [PATCH 28/52] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/courses/shixunHomework/Trainingjobsetting.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index e0e26577e..eb9c68f02 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -1837,7 +1837,7 @@ class Trainingjobsetting extends Component { flagPageEditsfor:endtime, completionefficiencyscore:true, work_efficiencys:true, - unifiedsetting:datas.data.unifiedsetting, + unifiedsetting:datas.data.unified_setting, latedeductiontwo:20, }); //均分比例 @@ -1862,7 +1862,7 @@ class Trainingjobsetting extends Component { flagPageEditstwo:releasetime, flagPageEditsthrees:deadline, flagPageEditsfor:endtime, - unifiedsetting:datas.data.unifiedsetting, + unifiedsetting:datas.data.unified_setting, }); if(datas.data.work_efficiencys===true){ this.setState({ @@ -1882,7 +1882,7 @@ class Trainingjobsetting extends Component { flagPageEditstwo:releasetime, flagPageEditsthrees:deadline, flagPageEditsfor:endtime, - unifiedsetting:datas.data.unifiedsetting, + unifiedsetting:datas.data.unified_setting, }); if(datas.data.work_efficiencys===true){ this.setState({ From 8df6fd8607aed6ac506bfebb4c62f0261d690346 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, 25 Sep 2019 10:11:31 +0800 Subject: [PATCH 29/52] =?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/courses/shixunHomework/Trainingjobsetting.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index c2800ee7e..cb75a765c 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -1868,7 +1868,7 @@ class Trainingjobsetting extends Component { flagPageEditsfor:endtime, unifiedsetting:datas.data.unified_setting, }); - if(datas.data.work_efficiencys===true){ + if(datas.data.work_efficiency===true){ this.setState({ completionefficiencyscore:true, }) @@ -1890,7 +1890,7 @@ class Trainingjobsetting extends Component { flagPageEditsfor:endtime, unifiedsetting:datas.data.unified_setting, }); - if(datas.data.work_efficiencys===true){ + if(datas.data.work_efficiency===true){ this.setState({ completionefficiencyscore:true, }) From 8e7ee4225a503f535f59515c9e3d676568c1c5ad 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, 25 Sep 2019 10:12:26 +0800 Subject: [PATCH 30/52] =?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/courses/shixunHomework/Trainingjobsetting.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index eb9c68f02..3189f5c63 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -1864,7 +1864,7 @@ class Trainingjobsetting extends Component { flagPageEditsfor:endtime, unifiedsetting:datas.data.unified_setting, }); - if(datas.data.work_efficiencys===true){ + if(datas.data.work_efficiency===true){ this.setState({ completionefficiencyscore:true, }) @@ -1884,7 +1884,7 @@ class Trainingjobsetting extends Component { flagPageEditsfor:endtime, unifiedsetting:datas.data.unified_setting, }); - if(datas.data.work_efficiencys===true){ + if(datas.data.work_efficiency===true){ this.setState({ completionefficiencyscore:true, }) From 604eb47f4476c5f79baee5cdb0a8deb5b5fa012e Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Wed, 25 Sep 2019 10:30:29 +0800 Subject: [PATCH 31/52] test --- app/controllers/games_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/games_controller.rb b/app/controllers/games_controller.rb index be8173b2f..709b4edfd 100644 --- a/app/controllers/games_controller.rb +++ b/app/controllers/games_controller.rb @@ -431,6 +431,7 @@ class GamesController < ApplicationController # params[:status] 1: 目录树点击的请求 0:正常自动加载 # 返回参数status : -1 系统统一报错提示;-3 需要轮训重试,带retry参数;-4 立即重试 def rep_content + raise("666") challenge_path = @game.challenge.try(:path) if challenge_path.blank? tip_exception("代码获取异常,请检查实训模板的评测设置是否正确") From 031fc9f138792859db083c1f1d570ebfc09d5445 Mon Sep 17 00:00:00 2001 From: p31729568 Date: Wed, 25 Sep 2019 11:14:05 +0800 Subject: [PATCH 32/52] ecs: fix 404 --- app/controllers/ecs/reach_criteria_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/ecs/reach_criteria_controller.rb b/app/controllers/ecs/reach_criteria_controller.rb index bbfa123cd..0850f3aff 100644 --- a/app/controllers/ecs/reach_criteria_controller.rb +++ b/app/controllers/ecs/reach_criteria_controller.rb @@ -1,4 +1,4 @@ -class ReachCriteriaController < Ecs::BaseController +class Ecs::ReachCriteriaController < Ecs::BaseController before_action :check_major_manager_permission!, only: [:create] def create From 91359292a6218bddd8c7470dbd4d1caa15903018 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, 25 Sep 2019 11:38:58 +0800 Subject: [PATCH 33/52] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=99=BB=E5=BD=95=20?= =?UTF-8?q?=E9=AA=8C=E8=AF=81=E9=80=BB=E8=BE=91=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/courses/Resource/Fileslistitem.js | 14 +- .../src/modules/courses/Resource/index.js | 47 ++-- .../modules/courses/boards/BoardsListItem.js | 239 +++++++++--------- .../courses/busyWork/CommonWorkItem.js | 27 +- .../courses/coursesDetail/CoursesLeftNav.js | 5 +- .../courses/exercise/ExerciseListItem.js | 27 +- .../graduation/tasks/GraduateTaskItem.js | 29 ++- .../graduation/topics/GraduateTopicItem.js | 15 +- .../src/modules/courses/poll/PollListItem.js | 26 +- .../shixunHomework/ShixunhomeWorkItem.js | 32 ++- public/react/src/modules/login/LoginDialog.js | 6 +- .../modules/paths/PathDetail/DetailCards.js | 20 +- .../src/modules/paths/PathDetail/DetailTop.js | 25 +- public/react/src/modules/tpm/TPMBanner.js | 4 +- .../tpm/shixunchild/Challenges/Challenges.js | 2 +- 15 files changed, 309 insertions(+), 209 deletions(-) diff --git a/public/react/src/modules/courses/Resource/Fileslistitem.js b/public/react/src/modules/courses/Resource/Fileslistitem.js index 4e8e89567..f6df24011 100644 --- a/public/react/src/modules/courses/Resource/Fileslistitem.js +++ b/public/react/src/modules/courses/Resource/Fileslistitem.js @@ -28,6 +28,16 @@ class Fileslistitem extends Component{ } showfiles=(list)=>{ + if(this.props.checkIfLogin()===false){ + this.props.showLoginDialog() + return + } + + if(this.props.checkIfProfileCompleted()===false){ + this.props.showProfileCompleteDialog() + return + } + if(list.is_history_file===false){ // this.props.DownloadFileA(list.title,list.url) //window.location.href=list.url; @@ -217,7 +227,9 @@ class Fileslistitem extends Component{ { this.props.isNotMember===true? discussMessage.is_lock === true ? - {discussMessage.title} + + {discussMessage.title} + :this.showfiles(discussMessage)} title={discussMessage.title} diff --git a/public/react/src/modules/courses/Resource/index.js b/public/react/src/modules/courses/Resource/index.js index c52f3753a..02b1d5be1 100644 --- a/public/react/src/modules/courses/Resource/index.js +++ b/public/react/src/modules/courses/Resource/index.js @@ -113,31 +113,36 @@ class Fileslists extends Component{ updadatalist=(id)=>{ // this.seactall(id) - let coursesId=this.props.match.params.coursesId; - let url="/courses/"+coursesId+"/attahcment_category_list.json"; - axios.get(url, { - }).then((response) => { - if(response!=undefined){ - - if(response.data&&response.data) { - if (response.data.status != 401) { - let list = response.data.course_modules; - let course_second_categoriess; - list.map((item, key) => { - course_second_categoriess = item.course_second_categories - }) - - this.setState({ - course_modules: response.data, - has_course_groups: response.data.has_course_groups, - course_second_categories: course_second_categoriess - }) + if(this.props.user&&this.props.user.login=== ""||this.props.user&&this.props.user.login=== null||this.props.user&&this.props.user.login=== undefined){ + + }else{ + let coursesId=this.props.match.params.coursesId; + let url="/courses/"+coursesId+"/attahcment_category_list.json"; + axios.get(url, { + }).then((response) => { + if(response!=undefined){ + + if(response.data&&response.data) { + if (response.data.status != 401) { + let list = response.data.course_modules; + let course_second_categoriess; + list.map((item, key) => { + course_second_categoriess = item.course_second_categories + }) + + this.setState({ + course_modules: response.data, + has_course_groups: response.data.has_course_groups, + course_second_categories: course_second_categoriess + }) + } } + } - } + }) + } - }) } updatafiled=()=>{ if(this.props.match.params.main_id){ diff --git a/public/react/src/modules/courses/boards/BoardsListItem.js b/public/react/src/modules/courses/boards/BoardsListItem.js index 5abb25adb..14966f43a 100644 --- a/public/react/src/modules/courses/boards/BoardsListItem.js +++ b/public/react/src/modules/courses/boards/BoardsListItem.js @@ -1,115 +1,126 @@ -import React,{ Component } from "react"; -import {Tooltip} from 'antd' -import moment from 'moment' -import { getUrl, WordsBtn } from 'educoder' -class BoardsListItem extends Component{ - constructor(props){ - super(props); - this.state = { - - } - } - onTitleClick = (discussMessage) => { - const isAdminOrStudent = this.props.isAdminOrStudent(); - if (!isAdminOrStudent && discussMessage.is_public == false) { - // 没有权限访问 - return; - } - const cid = this.props.match.params.coursesId - const board_id = this.props.match.params.boardId - this.props.toDetailPage(cid, board_id, discussMessage.id) - } - render(){ - let { addGroup } = this.state; - const isAdmin = this.props.isAdmin() - const isAdminOrStudent = this.props.isAdminOrStudent() - const { checkBox, discussMessage, onSticky, onItemClick, current_user } = this.props; - if (!discussMessage || !discussMessage.author) { - return ''; - } - let canNotLink = !isAdminOrStudent && discussMessage.is_public == false - - return( -
            - - { checkBox } - - {/* /images/avatars/User/1?1529221779 */} - 1?1529221779 - -
            onItemClick(discussMessage)}> -
            - {} : () => this.onTitleClick(discussMessage)} - title={`${discussMessage.subject.length > 40 ? discussMessage.subject : ''}`} - >{discussMessage.subject} - { !!discussMessage.sticky && 置顶 } - { - - discussMessage.is_public == false ? ( - - ) : "" - } -
            - -
            -

            - - {discussMessage.author.name} - - { discussMessage.total_replies_count != 0 && {discussMessage.total_replies_count} 回复 } - { discussMessage.praises_count != 0 && {discussMessage.praises_count} 点赞 } - { discussMessage.visits != 0 && {discussMessage.visits} 浏览 } - - {moment(discussMessage.created_on).fromNow()} - -

            -
            - {(isAdmin || discussMessage.author.login == current_user.login) && - { this.props.toEditPage(this.props.match.params.coursesId, this.props.match.params.boardId, discussMessage.id )} }>编辑 } - - { isAdmin && { debugger; onSticky(discussMessage); e.cancelBubble = true; e.stopPropagation();}}> - { discussMessage.sticky ? '取消置顶' : '置顶' } } -
            - - - - - - {/* { (isAdmin || discussMessage.author.login == current_user.login) && - - } */} - - -
            -
            - ) - } -} +import React,{ Component } from "react"; +import {Tooltip} from 'antd' +import moment from 'moment' +import { getUrl, WordsBtn } from 'educoder' +class BoardsListItem extends Component{ + constructor(props){ + super(props); + this.state = { + + } + } + onTitleClick = (discussMessage) => { + if(this.props.checkIfLogin()===false){ + this.props.showLoginDialog() + return + } + + if(this.props.checkIfProfileCompleted()===false){ + this.props.showProfileCompleteDialog() + return + } + + const isAdminOrStudent = this.props.isAdminOrStudent(); + if (!isAdminOrStudent && discussMessage.is_public == false) { + // 没有权限访问 + return; + } + const cid = this.props.match.params.coursesId + const board_id = this.props.match.params.boardId + this.props.toDetailPage(cid, board_id, discussMessage.id) + } + render(){ + let { addGroup } = this.state; + const isAdmin = this.props.isAdmin() + const isAdminOrStudent = this.props.isAdminOrStudent() + const { checkBox, discussMessage, onSticky, onItemClick, current_user } = this.props; + if (!discussMessage || !discussMessage.author) { + return ''; + } + let canNotLink = !isAdminOrStudent && discussMessage.is_public == false + + return( +
            + + { checkBox } + + {/* /images/avatars/User/1?1529221779 */} + 1?1529221779 + +
            onItemClick(discussMessage)}> +
            + 40 ? discussMessage.subject : ''}`} placement="bottom"> + {} : () => this.onTitleClick(discussMessage)} + >{discussMessage.subject} + + { !!discussMessage.sticky && 置顶 } + { + + discussMessage.is_public == false ? ( + + ) : "" + } +
            + +
            +

            + + {discussMessage.author.name} + + { discussMessage.total_replies_count != 0 && {discussMessage.total_replies_count} 回复 } + { discussMessage.praises_count != 0 && {discussMessage.praises_count} 点赞 } + { discussMessage.visits != 0 && {discussMessage.visits} 浏览 } + + {moment(discussMessage.created_on).fromNow()} + +

            +
            + {(isAdmin || discussMessage.author.login == current_user.login) && + { this.props.toEditPage(this.props.match.params.coursesId, this.props.match.params.boardId, discussMessage.id )} }>编辑 } + + { isAdmin && { debugger; onSticky(discussMessage); e.cancelBubble = true; e.stopPropagation();}}> + { discussMessage.sticky ? '取消置顶' : '置顶' } } +
            + + + + + + {/* { (isAdmin || discussMessage.author.login == current_user.login) && + + } */} + + +
            +
            + ) + } +} export default BoardsListItem; \ No newline at end of file diff --git a/public/react/src/modules/courses/busyWork/CommonWorkItem.js b/public/react/src/modules/courses/busyWork/CommonWorkItem.js index 122ed12d2..183682619 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkItem.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkItem.js @@ -16,7 +16,18 @@ class CommonWorkItem extends Component{ } } onItemClick = (item) => { - const isStudent = this.props.isStudent() + + if(this.props.checkIfLogin()===false){ + this.props.showLoginDialog() + return + } + + if(this.props.checkIfProfileCompleted()===false){ + this.props.showProfileCompleteDialog() + return + } + + const isStudent = this.props.isStudent() if (isStudent) { this.props.toWorkQuestionPage(this.props.match.params, item.homework_id) } else { @@ -144,15 +155,15 @@ class CommonWorkItem extends Component{ }
            this.props.onItemClick(Object.assign({}, item, {id: item.homework_id})) }>

            - {} : () => this.onItemClick(item)} - >{item.name} - + + {} : () => this.onItemClick(item)} + >{item.name} + {/* 只有非课堂成员且作业是私有的情况下才会为true */} { item.private_icon===true ? - ( + ( ) : "" } @@ -182,7 +193,7 @@ class CommonWorkItem extends Component{ {item.uncommit_count===undefined?"":{item.uncommit_count} 未交} { item.status_time!="" && - { - if(key===this.props.indexs){ - console.log(key) - console.log(this.props.indexs) - } + return(

            {/**/} diff --git a/public/react/src/modules/courses/exercise/ExerciseListItem.js b/public/react/src/modules/courses/exercise/ExerciseListItem.js index 750b9eb19..e025456e2 100644 --- a/public/react/src/modules/courses/exercise/ExerciseListItem.js +++ b/public/react/src/modules/courses/exercise/ExerciseListItem.js @@ -51,6 +51,21 @@ class ExerciseListItem extends Component{ Loadtype:false }) } + + toDetailPage=(url)=>{ + + if(this.props.checkIfLogin()===false){ + this.props.showLoginDialog() + return + } + + if(this.props.checkIfProfileCompleted()===false){ + this.props.showProfileCompleteDialog() + return + } + + this.props.history.push(url); + } render(){ let{item,checkBox,index}=this.props; let {coursesId,Id}=this.props.match.params @@ -96,20 +111,22 @@ class ExerciseListItem extends Component{ {/*{item.exercise_name}*/} { - this.props.isAdmin()? {item.exercise_name}:"" + onClick={()=>this.toDetailPage(`/courses/${coursesId}/exercises/${item.id}/student_exercise_list?tab=0`)}>{item.exercise_name}:"" } { this.props.isStudent()? - {item.exercise_name}:"" + this.toDetailPage(`/courses/${coursesId}/exercises/${item.id}/student_exercise_list?tab=0`)}>{item.exercise_name}:"" } { this.props.isNotMember()? item.lock_status === 0 ? - {item.exercise_name} - : {item.exercise_name}:"" + + {item.exercise_name} + + : this.toDetailPage(`/courses/${coursesId}/exercises/${item.id}/student_exercise_list?tab=0`)}>{item.exercise_name}:"" } { diff --git a/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js b/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js index 1a0952a95..fb43b412a 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js @@ -133,6 +133,21 @@ class GraduateTaskItem extends Component{ setupdate=()=>{ this.props.funlist } + + toDetailPage=(url)=>{ + + if(this.props.checkIfLogin()===false){ + this.props.showLoginDialog() + return + } + + if(this.props.checkIfProfileCompleted()===false){ + this.props.showProfileCompleteDialog() + return + } + + this.props.history.push(url); + } render(){ let { Modalstype, @@ -215,20 +230,22 @@ class GraduateTaskItem extends Component{
            { - this.props.isAdmin?this.toDetailPage("/courses/"+coursesId+"/graduation_tasks/"+categoryid+"/detail/"+taskid+"/list")} title={discussMessage.name} - className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}:"" + className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}:"" } { - this.props.isStudent? this.toDetailPage("/courses/"+coursesId+"/graduation_tasks/"+categoryid+"/detail/"+taskid+"/list")} title={discussMessage.name} - className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}:"" + className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}:"" } { this.props.isNotMember===true?this.props.discussMessage.private_icon===true? - {discussMessage.name} - : + {discussMessage.name} + + :this.toDetailPage("/courses/"+coursesId+"/graduation_tasks/"+categoryid+"/"+taskid+"/list")} title={discussMessage.name} className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}:"" } diff --git a/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js b/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js index bac04c699..cfb753501 100644 --- a/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js +++ b/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js @@ -15,6 +15,17 @@ class GraduateTopicItem extends Component{ this.props.history.push(`/courses/${courseId}/graduation_topics/${topicId}/edit`); } toDetailPage=(topicId)=>{ + + if(this.props.checkIfLogin()===false){ + this.props.showLoginDialog() + return + } + + if(this.props.checkIfProfileCompleted()===false){ + this.props.showProfileCompleteDialog() + return + } + let courseId=this.props.match.params.coursesId; this.props.history.push(`/courses/${courseId}/graduation_topics/${topicId}/detail`); } @@ -71,7 +82,9 @@ class GraduateTopicItem extends Component{
            { isNotMember? - {discussMessage.name}:"" + + {discussMessage.name} + :"" } { diff --git a/public/react/src/modules/courses/poll/PollListItem.js b/public/react/src/modules/courses/poll/PollListItem.js index 359ef872c..356b758c8 100644 --- a/public/react/src/modules/courses/poll/PollListItem.js +++ b/public/react/src/modules/courses/poll/PollListItem.js @@ -1,5 +1,5 @@ import React,{ Component } from "react"; -import Tooltip from 'material-ui/Tooltip'; +import {Tooltip} from 'antd'; import {Link} from 'react-router-dom'; import moment from 'moment'; import CoursesListType from '../coursesPublic/CoursesListType'; @@ -15,6 +15,20 @@ class PollListItem extends Component{ constructor(props){ super(props); } + toDetailPage=(url)=>{ + + if(this.props.checkIfLogin()===false){ + this.props.showLoginDialog() + return + } + + if(this.props.checkIfProfileCompleted()===false){ + this.props.showProfileCompleteDialog() + return + } + + this.props.history.push(url); + } render(){ let{item,checkBox,courseType,index}=this.props; let {coursesId}=this.props.match.params; @@ -37,12 +51,16 @@ class PollListItem extends Component{ }

            - { canNotLink ? {item.polls_name} : - {item.polls_name} + { canNotLink ? + + {item.polls_name} + + : + this.toDetailPage(`/courses/${coursesId}/polls/${item.id}/detail`)} className="fl font-16 font-bd mt2 color-grey-3 task-hide pointer" style={{"maxWidth":"600px"}} title={item.polls_name}>{item.polls_name} } { item.lock_status === 0 ? - + :"" diff --git a/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js b/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js index b56993b08..b29ee6121 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js @@ -143,6 +143,22 @@ class ShixunhomeWorkItem extends Component{ ModalsRenametype:false, }) } + + hrefjumpskip=(url)=>{ + + if(this.props.checkIfLogin()===false){ + this.props.showLoginDialog() + return + } + + if(this.props.checkIfProfileCompleted()===false){ + this.props.showProfileCompleteDialog() + return + } + + this.props.history.push(url); + + } render(){ let { Modalstype, @@ -294,23 +310,25 @@ class ShixunhomeWorkItem extends Component{ {/*to={`/courses/${this.props.match.params.coursesId}/${discussMessage.homework_id}/jobsettings`}*/} { - this.props.isAdmin?this.hrefjumpskip("/courses/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+discussMessage.homework_id+"/list?tab=0")} title={discussMessage.name} - className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}:"" + className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}:"" } { - this.props.isStudent? this.hrefjumpskip(`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/list?tab=0`)} title={discussMessage.name} - className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}:"" + className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}:"" } { this.props.isNotMember===true? this.props.discussMessage.private_icon===true? - {discussMessage.name} - : + {discussMessage.name} + + : this.hrefjumpskip(`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${discussMessage.homework_id}/list?tab=0`)} title={discussMessage.name} - className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}:"" + className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}:"" } diff --git a/public/react/src/modules/login/LoginDialog.js b/public/react/src/modules/login/LoginDialog.js index f4f8a3f1c..f46d549ed 100644 --- a/public/react/src/modules/login/LoginDialog.js +++ b/public/react/src/modules/login/LoginDialog.js @@ -400,7 +400,11 @@ class LoginDialog extends Component { handleDialogClose = () => { if(this.props.match===undefined){ - window.location.href="/"; + // window.location.href="/"; + this.setState({ + isRender: false + }) + this.props.Modifyloginvalue(); }else{ this.setState({ isRender: false diff --git a/public/react/src/modules/paths/PathDetail/DetailCards.js b/public/react/src/modules/paths/PathDetail/DetailCards.js index bd42af623..be2a9908d 100644 --- a/public/react/src/modules/paths/PathDetail/DetailCards.js +++ b/public/react/src/modules/paths/PathDetail/DetailCards.js @@ -3,7 +3,6 @@ import {getImageUrl} from 'educoder'; import {Tooltip,Modal,Icon,Spin,message} from 'antd'; import DetailCardsEditAndAdd from './DetailCardsEditAndAdd'; import DetailCardsEditAndEdit from './DetailCardsEditAndEdit'; -import AccountProfile from"../../user/AccountProfile"; import { BrowserRouter as Router, Route, Link } from "react-router-dom"; import axios from 'axios'; import { DragDropContext , Draggable, Droppable} from 'react-beautiful-dnd'; @@ -201,10 +200,8 @@ class DetailCards extends Component{ return } - if(this.props.current_user&&this.props.current_user.profile_completed===false){ - this.setState({ - AccountProfiletype:true - }) + if(this.props.checkIfProfileCompleted()===false){ + this.props.showProfileCompleteDialog() return } @@ -308,16 +305,11 @@ class DetailCards extends Component{ startshixunCombattype:false }) } - hideAccountProfile=()=>{ - this.setState({ - AccountProfiletype:false - }) - } + render(){ let { pathCardsList, dropid, - AccountProfiletype, idsum, pathCardsedittype, pathlistedit, @@ -339,11 +331,7 @@ class DetailCards extends Component{ // console.log("zzz"+this.props.MenuItemsindextype) return(

            - {AccountProfiletype===true?this.hideAccountProfile()} - {...this.props} - {...this.state} - />:""} + { - this.setState({ - AccountProfiletype:false - }) - } + render(){ let{detailInfoList}=this.props; - let{Modalstype,Modalstopval,cardsModalcancel,putappointmenttype,Modalsbottomval,cardsModalsavetype,loadtype,getappointmenttype,AccountProfiletype}=this.state; + let{Modalstype,Modalstopval,cardsModalcancel,putappointmenttype,Modalsbottomval,cardsModalsavetype,loadtype,getappointmenttype}=this.state; const radioStyle = { display: 'block', height: '30px', @@ -373,11 +366,7 @@ class DetailTop extends Component{ return(
            40?"subhead mb100":"subhead mb70":this.state.MenuItemskey===this.props.courses.length?"subhead mb120":detailInfoList.name.length>40?"subhead mb100":"subhead mb80"}> - {AccountProfiletype===true?this.hideAccountProfile()} - {...this.props} - {...this.state} - />:""} + Date: Wed, 25 Sep 2019 11:48:07 +0800 Subject: [PATCH 34/52] =?UTF-8?q?=E8=83=8C=E6=99=AF=E7=9F=A5=E8=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/tpm/TPMUpdatepropaede/TPMUpdatepropaede.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/tpm/TPMUpdatepropaede/TPMUpdatepropaede.js b/public/react/src/modules/tpm/TPMUpdatepropaede/TPMUpdatepropaede.js index a847c4125..63872b133 100644 --- a/public/react/src/modules/tpm/TPMUpdatepropaede/TPMUpdatepropaede.js +++ b/public/react/src/modules/tpm/TPMUpdatepropaede/TPMUpdatepropaede.js @@ -52,7 +52,7 @@ export default class TPMUpdatepropaede extends Component { updatepropaedeuticsvalue=()=>{ let id = this.props.match.params.shixunId; let url="/shixuns/"+id+"/update_propaedeutics.json"; - const update_propaedeuticsvalue = this.editanswersRef.current.getValue().trim(); + const update_propaedeuticsvalue = this.neweditanswerRef.current.getValue().trim(); axios.post(url,{ content:update_propaedeuticsvalue } From 88970c05e52552cf5f15190d359e5cb3080c8116 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Wed, 25 Sep 2019 11:48:59 +0800 Subject: [PATCH 35/52] =?UTF-8?q?=E6=9C=AA=E5=8F=91=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/courses/busyWork/CommonWorkList.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/busyWork/CommonWorkList.js b/public/react/src/modules/courses/busyWork/CommonWorkList.js index bd765eaa9..3b3491675 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkList.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkList.js @@ -641,7 +641,7 @@ class CommonWorkList extends Component{ timeMsg = '申诉剩余时间' } - const hasData = student_works && !!student_works.length && page == 1 + const hasData = this.state.homework_status && this.state.homework_status.indexOf("未发布") == -1 // student_works && !!student_works.length && page == 1 && // console.log(StudentData) // console.log(student_works) From 20949e6fca97907fee99e66346222eb7bff2ea9e 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, 25 Sep 2019 14:47:39 +0800 Subject: [PATCH 36/52] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/courses/shixunHomework/shixunHomework.js | 8 +++++--- public/react/src/modules/login/LoginDialog.js | 12 +++++++----- .../paths/PathDetail/DetailCardsEditAndAdd.js | 2 +- .../paths/PathDetail/DetailCardsEditAndEdit.js | 2 +- .../tpm/shixunchild/Collaborators/Collaborators.js | 8 ++++---- 5 files changed, 18 insertions(+), 14 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/shixunHomework.js b/public/react/src/modules/courses/shixunHomework/shixunHomework.js index eb59ce6f1..5298baffc 100644 --- a/public/react/src/modules/courses/shixunHomework/shixunHomework.js +++ b/public/react/src/modules/courses/shixunHomework/shixunHomework.js @@ -84,7 +84,8 @@ class ShixunHomework extends Component{ } componentDidMount() { this.setState({ - isSpin:true + isSpin:true, + }) if(this.props.match.params.main_id){ this.setState({ @@ -108,7 +109,8 @@ class ShixunHomework extends Component{ } seactall=(id)=>{ this.setState({ - isSpin:true + isSpin:true, + checkBoxValues:[] }) let coursesId=this.props.match.params.coursesId; let url="/courses/"+coursesId+"/homework_commons.json?type=4"; @@ -1080,7 +1082,7 @@ class ShixunHomework extends Component{ : this.editDir(datas&&datas.category_name)} className={"mr30 font-16"}>目录重命名:""} {this.props.isAdmin()===true?datas&&datas.category_name===undefined||datas&&datas.category_name===null?选用实践课程:"":""} - {this.props.isAdmin()===true?this.showNewShixunModelType()}>选用实训:""} + {this.props.isAdmin()===true?this.showNewShixunModelType()}>选用实训项目:""}

            diff --git a/public/react/src/modules/login/LoginDialog.js b/public/react/src/modules/login/LoginDialog.js index f46d549ed..dd34d8605 100644 --- a/public/react/src/modules/login/LoginDialog.js +++ b/public/react/src/modules/login/LoginDialog.js @@ -399,12 +399,14 @@ class LoginDialog extends Component { } handleDialogClose = () => { + console.log(this.props.match) +debugger if(this.props.match===undefined){ - // window.location.href="/"; - this.setState({ - isRender: false - }) - this.props.Modifyloginvalue(); + window.location.href="/"; + // this.setState({ + // isRender: false + // }) + // this.props.Modifyloginvalue(); }else{ this.setState({ isRender: false diff --git a/public/react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js b/public/react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js index 433146b8c..ed4cc85eb 100644 --- a/public/react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js +++ b/public/react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js @@ -374,7 +374,7 @@ class DetailCardsEditAndAdd extends Component{

            - 选择实训 + 选用实训项目 选择下面实训后,可以通过拖拽进行排序调整

            diff --git a/public/react/src/modules/paths/PathDetail/DetailCardsEditAndEdit.js b/public/react/src/modules/paths/PathDetail/DetailCardsEditAndEdit.js index 3d1559797..a37dffecb 100644 --- a/public/react/src/modules/paths/PathDetail/DetailCardsEditAndEdit.js +++ b/public/react/src/modules/paths/PathDetail/DetailCardsEditAndEdit.js @@ -378,7 +378,7 @@ class DetailCardsEditAndEdit extends Component{

            - 选择实训 + 选用实训项目 选择下面实训后,可以通过拖拽进行排序调整

            diff --git a/public/react/src/modules/tpm/shixunchild/Collaborators/Collaborators.js b/public/react/src/modules/tpm/shixunchild/Collaborators/Collaborators.js index 0212b4ba4..7921941df 100644 --- a/public/react/src/modules/tpm/shixunchild/Collaborators/Collaborators.js +++ b/public/react/src/modules/tpm/shixunchild/Collaborators/Collaborators.js @@ -34,7 +34,7 @@ class Collaborators extends Component { Collaboratorsvisibleadmin: false, value: 1, page: 1, - Searchadmin: [], + Searchadmin: undefined, allChangechecked: false, Collaboratorslist: [], Collaboratorslisttype: false, @@ -434,10 +434,10 @@ class Collaborators extends Component { height: '30px', lineHeight: '30px', }; - // console.log(collaboratorList) const antIcon = ; + console.log(Searchadmin) return (

              - {Searchadmin.length === 0 ?
            • + {Searchadmin === undefined ?
            • 请试试搜索一下 -
            • : Searchadmin.map((item, key) => { + :Searchadmin.length === 0 ? "": Searchadmin.map((item, key) => { return (
            • Date: Wed, 25 Sep 2019 15:24:34 +0800 Subject: [PATCH 37/52] Merge branches 'dev_aliyun' and 'onigin/ysl_a' of https://bdgit.educoder.net/Hjqreturn/educoder into onigin/ysl_a # Conflicts: # public/react/src/modules/courses/Resource/Fileslistitem.js # public/react/src/modules/courses/busyWork/CommonWorkItem.js # public/react/src/modules/courses/exercise/ExerciseListItem.js # public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js # public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js # public/react/src/modules/courses/poll/PollListItem.js # public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js # public/react/src/modules/login/LoginDialog.js --- .../courses/graduation/topics/GraduateTopicItem.js | 2 +- public/react/src/modules/login/LoginDialog.js | 6 ++---- public/react/src/modules/tpm/TPMIndexHOC.js | 8 +++++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js b/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js index cfb753501..45b54899f 100644 --- a/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js +++ b/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js @@ -17,7 +17,7 @@ class GraduateTopicItem extends Component{ toDetailPage=(topicId)=>{ if(this.props.checkIfLogin()===false){ - this.props.showLoginDialog() + this.props.showLoginDialog("iscancel") return } diff --git a/public/react/src/modules/login/LoginDialog.js b/public/react/src/modules/login/LoginDialog.js index dd34d8605..13ba02238 100644 --- a/public/react/src/modules/login/LoginDialog.js +++ b/public/react/src/modules/login/LoginDialog.js @@ -398,11 +398,9 @@ class LoginDialog extends Component { }); } handleDialogClose = () => { - - console.log(this.props.match) -debugger - if(this.props.match===undefined){ + if(this.props.isloginCancel===undefined){ window.location.href="/"; + this.props.Modifyloginvalue(); // this.setState({ // isRender: false // }) diff --git a/public/react/src/modules/tpm/TPMIndexHOC.js b/public/react/src/modules/tpm/TPMIndexHOC.js index 0f753b96c..4d2e4fbba 100644 --- a/public/react/src/modules/tpm/TPMIndexHOC.js +++ b/public/react/src/modules/tpm/TPMIndexHOC.js @@ -83,6 +83,7 @@ export function TPMIndexHOC(WrappedComponent) { globalLoading: false, dataquerys:{}, + isloginCancel:undefined } } @@ -429,15 +430,16 @@ export function TPMIndexHOC(WrappedComponent) { }; hideLoginDialog = () => { this.setState({ - isRender: false + isRender: false, + isloginCancel:undefined }) } showLoginDialog = () => { this.setState({ - isRender: true + isRender: true, + isloginCancel:"iscancel" }) } - checkIfLogin = () => { return this.state.current_user && this.state.current_user.login != '' } From 4142bd3b36c31231eb7d196ee2af47b5d78a0779 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, 25 Sep 2019 15:28:30 +0800 Subject: [PATCH 38/52] =?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/courses/shixunHomework/Listofworksstudentone.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index 93ed7ff7d..fa2490b8f 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -3320,7 +3320,7 @@ class Listofworksstudentone extends Component {
              {teacherdata === undefined ? "" : teacherdata.all_member_count}个检索结果({teacherdata === undefined ? "" : teacherdata.all_member_count}学生) + className="color-orange-tip">{teacherdata === undefined ? "" : teacherdata.work_count&&teacherdata.work_count}个检索结果({teacherdata === undefined ? "" : teacherdata.all_member_count&&teacherdata.all_member_count}学生) + :"" + } +
              发布规则{r+1}
              @@ -396,7 +412,7 @@ class PollDetailTabForthRules extends Component{

              -
              +
              -
              +
              Date: Wed, 25 Sep 2019 16:06:40 +0800 Subject: [PATCH 42/52] =?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/GraduationTaskssetting.js | 2 +- .../Collaborators/Collaborators.js | 154 +++++++++--------- 2 files changed, 82 insertions(+), 74 deletions(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js index 830525af2..5ca6ee537 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssetting.js @@ -1169,7 +1169,7 @@ class GraduationTaskssettingapp extends Component{
              评分设置
              最终成绩组成 (取各教师最终评分的平均分)
              - + 启用交叉评阅 (给老师分配其他指导老师的学生作品) diff --git a/public/react/src/modules/tpm/shixunchild/Collaborators/Collaborators.js b/public/react/src/modules/tpm/shixunchild/Collaborators/Collaborators.js index 7921941df..d67599bf1 100644 --- a/public/react/src/modules/tpm/shixunchild/Collaborators/Collaborators.js +++ b/public/react/src/modules/tpm/shixunchild/Collaborators/Collaborators.js @@ -16,8 +16,10 @@ import { getImageUrl, toPath } from 'educoder' import axios from 'axios'; +import NoneData from "../../../courses/coursesPublic/NoneData"; + import './Collaborators.css'; -import SchoolSelect from "../../../courses/members/modal/AddStudentModal"; + const $ = window.$; @@ -88,6 +90,7 @@ class Collaborators extends Component { }); } CollaboratorsshowModal = (type) => { + if (type === "cooperation") { this.setState({ Collaboratorsvisibleadmin: false, @@ -108,9 +111,10 @@ class Collaborators extends Component { } showCollaboratorsvisible = (type) => { + this.setState({ Collaboratorslist: [], - Searchadmin:[], + Searchadmin:undefined, onSearchcalue:"" }) let admintype = this.props.identity; @@ -160,7 +164,7 @@ class Collaborators extends Component { let {collaboratorList,user_name,school_name} = this.state; this.setState({ - Searchadmin: [], + // Searchadmin: undefined, spinnings:true, }) // if (value === "") { @@ -199,6 +203,7 @@ class Collaborators extends Component { } selectChangenickname = (e, key) => { + let {Searchadmin} = this.state; let newlist = Searchadmin; for (var i = 0; i < newlist.length; i++) { @@ -235,6 +240,7 @@ class Collaborators extends Component { } allChange = (e) => { + let {Searchadmin} = this.state; let newlist = Searchadmin; for (var i = 0; i < newlist.length; i++) { @@ -246,6 +252,7 @@ class Collaborators extends Component { }) } submit_add_collaborators_form = () => { + let id = this.props.match.params.shixunId; let {Searchadmin,collaboratorList} = this.state; let newlist = Searchadmin; @@ -300,6 +307,7 @@ class Collaborators extends Component { } submit_addadminredio = () => { + let {addadminrediovalue} = this.state; let id = this.props.match.params.shixunId; @@ -371,6 +379,7 @@ class Collaborators extends Component { contentViewScrolledit=(e)=>{ + //滑动到底判断 let newscrollTop=parseInt(e.currentTarget.scrollTop); let allclientHeight=e.currentTarget.clientHeight+newscrollTop; @@ -395,7 +404,6 @@ class Collaborators extends Component { newSearchadmin.push(newlist[i]) } - console.log(newSearchadmin) this.setState({ Searchadmin: newSearchadmin, collaboratorList: collaboratorList, @@ -495,68 +503,68 @@ class Collaborators extends Component { - - {/* this.onSearchadmin(value)}*/} - {/*onInput={this.onSearchadmins}*/} - {/*style={{width: '100%'}}*/} - {/*/>*/} - 姓名或手机号: - - {this.setState({user_name: e.target.value})}} - style={{ width: '215px'}} - > - 单位: - {this.setState({school_name: e.target.value})}} - style={{ width: '215px'}} - > + {Collaboratorsvisibleadmin===true? + {/* this.onSearchadmin(value)}*/} + {/*onInput={this.onSearchadmins}*/} + {/*style={{width: '100%'}}*/} + {/*/>*/} + 姓名或手机号: + + {this.setState({user_name: e.target.value})}} + style={{ width: '215px'}} + > + 单位: + {this.setState({school_name: e.target.value})}} + style={{ width: '215px'}} + > - this.onSearchadmin()} - style={{ height: '30px', lineHeight: '30px', width: '70px'}} - >搜索 -

              - 姓名 - 职业 - 单位 -

              -
              - -
              -
                - {Searchadmin === undefined ?
              • - 请试试搜索一下 -
              • :Searchadmin.length === 0 ? "": Searchadmin.map((item, key) => { - return ( -
              • - this.selectChangenickname(e, key)} - id={item.user_id}> - {item.nickname} - {item.identify} - {item.school_name} -
              • - ) - }) - - } -
              -
              -
              -
              -
              + this.onSearchadmin()} + style={{ height: '30px', lineHeight: '30px', width: '70px'}} + >搜索 +

              + 姓名 + 职业 + 单位 +

              +
              + +
              +
                + {Searchadmin === undefined ?
              • + 请试试搜索一下 +
              • :Searchadmin.length === 0 ?: Searchadmin.map((item, key) => { + return ( +
              • + this.selectChangenickname(e, key)} + id={item.user_id}> + {item.nickname} + {item.identify} + {item.school_name} +
              • + ) + }) + + } +
              +
              +
              +
              +
              全选 @@ -567,15 +575,15 @@ class Collaborators extends Component { -
              - {useristrue===true?请先选择用户:""} - - +
              + {useristrue===true?请先选择用户:""} + +
              :""}
              { From 275f245f4d2bd270cc9b4951ad483ea40cc9a743 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, 25 Sep 2019 16:20:51 +0800 Subject: [PATCH 43/52] =?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/courses/shixunHomework/Trainingjobsetting.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index cb75a765c..6bb3593ad 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -67,7 +67,7 @@ class Trainingjobsetting extends Component { // // }); this.state = { - flagPageEdit: undefined, + flagPageEdit: true, flagPageEdits: false, flagPageEditstwo:false, flagPageEditsthrees:false, From e7652a1acbfeab2e2255ff7a6c34cd9b3a304657 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, 25 Sep 2019 16:23:53 +0800 Subject: [PATCH 44/52] =?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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js index 184895428..0720d7240 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js @@ -1215,7 +1215,7 @@ class GraduationTaskssettinglist extends Component{
              {this.props.isAdmin()===true? {taskslistdata&&taskslistdata.work_count} - 个检索结果({taskslistdata&&taskslistdata.work_count} 学生):""} + 个检索结果({taskslistdata&&taskslistdata.all_work_count} 学生):""} {this.props.isAdmin()===true?

              From 0ee59c82b921cd50b7643a28ea5c52119da716a3 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, 25 Sep 2019 16:38:30 +0800 Subject: [PATCH 45/52] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/courses/exercise/Testpapersettinghomepage.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js b/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js index ba3cee3d3..d878eb872 100644 --- a/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js +++ b/public/react/src/modules/courses/exercise/Testpapersettinghomepage.js @@ -436,22 +436,22 @@ class Testpapersettinghomepage extends Component{ /> { // 教师列表 - parseInt(tab[0])==0 && this.setcourse_groupysls(value)} current_status = {this.state.current_status} Commonheadofthetestpaper={this.state.Commonheadofthetestpaper}> + parseInt(tab[0])==0 ? this.setcourse_groupysls(value)} current_status = {this.state.current_status} Commonheadofthetestpaper={this.state.Commonheadofthetestpaper}>:"" } {/*统计结果*/} { - parseInt(tab[0])==1 && + parseInt(tab[0])==1 ? :"" } { - parseInt(tab[0])==2 && + parseInt(tab[0])==2 ? :"" } { - parseInt(tab[0])==3 && + parseInt(tab[0])==3 ? :"" }

              From afbf3bd4397b4d0fc6f539eb412f2a3c96a56f81 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, 25 Sep 2019 17:01:40 +0800 Subject: [PATCH 46/52] =?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/tpm/shixunchild/Challenges/Challenges.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/tpm/shixunchild/Challenges/Challenges.js b/public/react/src/modules/tpm/shixunchild/Challenges/Challenges.js index bb59a0b3d..0bbe3581f 100644 --- a/public/react/src/modules/tpm/shixunchild/Challenges/Challenges.js +++ b/public/react/src/modules/tpm/shixunchild/Challenges/Challenges.js @@ -228,7 +228,7 @@ class Challenges extends Component { } - if(this.props.checkIfProfileCompleted()===false){ + if(this.props.checkIfProfessionalCertification()===false){ this.setState({ AccountProfiletype:true }) From 59315e4478380c9eb020561a1acb66b50b592bea 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, 25 Sep 2019 17:01:51 +0800 Subject: [PATCH 47/52] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/courses/Resource/Fileslistitem.js | 2 +- public/react/src/modules/courses/boards/BoardsListItem.js | 2 +- public/react/src/modules/courses/busyWork/CommonWorkItem.js | 2 +- public/react/src/modules/courses/exercise/ExerciseListItem.js | 2 +- .../src/modules/courses/graduation/tasks/GraduateTaskItem.js | 2 +- .../modules/courses/graduation/topics/GraduateTopicItem.js | 2 +- public/react/src/modules/courses/poll/PollListItem.js | 2 +- .../src/modules/courses/shixunHomework/ShixunhomeWorkItem.js | 2 +- public/react/src/modules/paths/PathDetail/DetailCards.js | 2 +- public/react/src/modules/paths/PathDetail/DetailTop.js | 4 ++-- public/react/src/modules/tpm/TPMBanner.js | 4 ++-- 11 files changed, 13 insertions(+), 13 deletions(-) diff --git a/public/react/src/modules/courses/Resource/Fileslistitem.js b/public/react/src/modules/courses/Resource/Fileslistitem.js index f6df24011..1e37ae370 100644 --- a/public/react/src/modules/courses/Resource/Fileslistitem.js +++ b/public/react/src/modules/courses/Resource/Fileslistitem.js @@ -33,7 +33,7 @@ class Fileslistitem extends Component{ return } - if(this.props.checkIfProfileCompleted()===false){ + if(this.props.checkIfProfessionalCertification()===false){ this.props.showProfileCompleteDialog() return } diff --git a/public/react/src/modules/courses/boards/BoardsListItem.js b/public/react/src/modules/courses/boards/BoardsListItem.js index 14966f43a..3b245f557 100644 --- a/public/react/src/modules/courses/boards/BoardsListItem.js +++ b/public/react/src/modules/courses/boards/BoardsListItem.js @@ -15,7 +15,7 @@ class BoardsListItem extends Component{ return } - if(this.props.checkIfProfileCompleted()===false){ + if(this.props.checkIfProfessionalCertification()===false){ this.props.showProfileCompleteDialog() return } diff --git a/public/react/src/modules/courses/busyWork/CommonWorkItem.js b/public/react/src/modules/courses/busyWork/CommonWorkItem.js index 183682619..3eb30518b 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkItem.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkItem.js @@ -22,7 +22,7 @@ class CommonWorkItem extends Component{ return } - if(this.props.checkIfProfileCompleted()===false){ + if(this.props.checkIfProfessionalCertification()===false){ this.props.showProfileCompleteDialog() return } diff --git a/public/react/src/modules/courses/exercise/ExerciseListItem.js b/public/react/src/modules/courses/exercise/ExerciseListItem.js index e025456e2..7fea267b6 100644 --- a/public/react/src/modules/courses/exercise/ExerciseListItem.js +++ b/public/react/src/modules/courses/exercise/ExerciseListItem.js @@ -59,7 +59,7 @@ class ExerciseListItem extends Component{ return } - if(this.props.checkIfProfileCompleted()===false){ + if(this.props.checkIfProfessionalCertification()===false){ this.props.showProfileCompleteDialog() return } diff --git a/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js b/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js index fb43b412a..36c7c1978 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js @@ -141,7 +141,7 @@ class GraduateTaskItem extends Component{ return } - if(this.props.checkIfProfileCompleted()===false){ + if(this.props.checkIfProfessionalCertification()===false){ this.props.showProfileCompleteDialog() return } diff --git a/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js b/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js index 45b54899f..c549d277a 100644 --- a/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js +++ b/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js @@ -21,7 +21,7 @@ class GraduateTopicItem extends Component{ return } - if(this.props.checkIfProfileCompleted()===false){ + if(this.props.checkIfProfessionalCertification()===false){ this.props.showProfileCompleteDialog() return } diff --git a/public/react/src/modules/courses/poll/PollListItem.js b/public/react/src/modules/courses/poll/PollListItem.js index 356b758c8..59c5e3fa0 100644 --- a/public/react/src/modules/courses/poll/PollListItem.js +++ b/public/react/src/modules/courses/poll/PollListItem.js @@ -22,7 +22,7 @@ class PollListItem extends Component{ return } - if(this.props.checkIfProfileCompleted()===false){ + if(this.props.checkIfProfessionalCertification()===false){ this.props.showProfileCompleteDialog() return } diff --git a/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js b/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js index b29ee6121..e7d29b1a8 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js @@ -151,7 +151,7 @@ class ShixunhomeWorkItem extends Component{ return } - if(this.props.checkIfProfileCompleted()===false){ + if(this.props.checkIfProfessionalCertification()===false){ this.props.showProfileCompleteDialog() return } diff --git a/public/react/src/modules/paths/PathDetail/DetailCards.js b/public/react/src/modules/paths/PathDetail/DetailCards.js index be2a9908d..21c3ab6d8 100644 --- a/public/react/src/modules/paths/PathDetail/DetailCards.js +++ b/public/react/src/modules/paths/PathDetail/DetailCards.js @@ -200,7 +200,7 @@ class DetailCards extends Component{ return } - if(this.props.checkIfProfileCompleted()===false){ + if(this.props.checkIfProfessionalCertification()===false){ this.props.showProfileCompleteDialog() return } diff --git a/public/react/src/modules/paths/PathDetail/DetailTop.js b/public/react/src/modules/paths/PathDetail/DetailTop.js index 049ed462d..3613e510d 100644 --- a/public/react/src/modules/paths/PathDetail/DetailTop.js +++ b/public/react/src/modules/paths/PathDetail/DetailTop.js @@ -249,7 +249,7 @@ class DetailTop extends Component{ return } - if(this.props.checkIfProfileCompleted()===false){ + if(this.props.checkIfProfessionalCertification()===false){ this.props.showProfileCompleteDialog() return } @@ -268,7 +268,7 @@ class DetailTop extends Component{ return } - if(this.props.checkIfProfileCompleted()===false){ + if(this.props.checkIfProfessionalCertification()===false){ this.props.showProfileCompleteDialog() return } diff --git a/public/react/src/modules/tpm/TPMBanner.js b/public/react/src/modules/tpm/TPMBanner.js index d2e382de0..881e24361 100644 --- a/public/react/src/modules/tpm/TPMBanner.js +++ b/public/react/src/modules/tpm/TPMBanner.js @@ -167,7 +167,7 @@ class TPMBanner extends Component { this.props.showLoginDialog() return } - if(this.props.checkIfProfileCompleted()===false){ + if(this.props.checkIfProfessionalCertification()===false){ this.setState({ AccountProfiletype:true }) @@ -390,7 +390,7 @@ class TPMBanner extends Component { return } - if(this.props.checkIfProfileCompleted()===false){ + if(this.props.checkIfProfessionalCertification()===false){ this.setState({ AccountProfiletype:true }) From 1cec2db4541f9fd3f6d5375a7b5a70413c20045d 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, 25 Sep 2019 17:12:08 +0800 Subject: [PATCH 48/52] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../exercise/Studentshavecompletedthelist.js | 45 +++++++++---------- 1 file changed, 20 insertions(+), 25 deletions(-) diff --git a/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js b/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js index 6fdde6aeb..57f574ac4 100644 --- a/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js +++ b/public/react/src/modules/courses/exercise/Studentshavecompletedthelist.js @@ -1278,20 +1278,6 @@ class Studentshavecompletedthelist extends Component { }catch (e) { } - try { - if(this.props.Commonheadofthetestpaper.exercise_status !== undefined){ - this.setState({ - exercise_status:this.props.Commonheadofthetestpaper.exercise_status, - }) - }else{ - this.setState({ - exercise_status:0, - }) - } - }catch (e) { - - } - } componentWillReceiveProps = (nextProps) => { @@ -1330,7 +1316,7 @@ class Studentshavecompletedthelist extends Component { }) if (response.data.current_answer_user === undefined || response.data.current_answer_user === null) { // 学生未截止 - + // console.log("试卷学生未截止"); this.Generatenewdatas(response.data.exercise_users); if (response.data.exercise_types.subjective === 0) { if (this.state.noclassroom === undefined || this.state.noclassroom === "" || this.state.noclassroom === null) { @@ -1377,6 +1363,7 @@ class Studentshavecompletedthelist extends Component { } } else { //学生已截止 + // console.log("试卷学生已截止"); if (response.data.exercise_types.subjective === 0) { if (this.state.loadingstate === false) { var arr =[]; @@ -1458,7 +1445,7 @@ class Studentshavecompletedthelist extends Component { else if (response.data.exercise_types.user_permission === 0) { // console.log(response.data.exercise_users) // console.log(response) - + // console.log("试卷老师加载中"); if (thiss.state.loadingstate === false) { thiss.setState({ loadingstate: true, @@ -1469,7 +1456,9 @@ class Studentshavecompletedthelist extends Component { thiss.Generatenewdatasy(response.data.exercise_users, response); } }).catch((error) => { - console.log(error) + console.log(error); + console.log("其实数据加载失败了"); + console.log("1111"); }); @@ -2490,16 +2479,22 @@ class Studentshavecompletedthelist extends Component { let {data, datas, page, columns, course_groupyslsthree, columnstwo, styletable,exercise_status, course_groupyslstwodatas, limit, course_groupysls, course_groupyslstwodata, course_groupyslstwo, teacherlists, Teacherliststudentlist, order, columnss, course_groupsdatas, course_groups, Evaluationarray, unlimited, unlimiteds, unlimitedtwo, teacherlist, searchtext, loadingstate, review, nocomment, commented, unsubmitted, submitted, columnsys, exercise_users,mylistansum} = this.state; // console.log("Studentshavecompletedthelist"); // console.log(this.props.current_status); + // console.log("获取到的数据"); + // console.log(datas); + // console.log(data); + // console.log("this.props.Commonheadofthetestpaper.exercise_status"); + // console.log(this.props.Commonheadofthetestpaper&&this.props.Commonheadofthetestpaper.exercise_status); + // console.log(exercise_status); return ( isAdmin === true ? (
              {/*老师*/} { - exercise_status===0 || exercise_status===1 ? + this.props.Commonheadofthetestpaper&&this.props.Commonheadofthetestpaper.exercise_status===0 || this.props.Commonheadofthetestpaper&&this.props.Commonheadofthetestpaper.exercise_status===1 ?
              @@ -2598,9 +2593,9 @@ class Studentshavecompletedthelist extends Component { {course_groups === undefined ? "" : course_groups === null ? "" : course_groups.length < 2 ? "" : JSON.stringify(course_groups) === "[]" ? "" :
            • - 分班情况: - this.funtaskstatustwos()}>不限 @@ -2714,9 +2709,9 @@ class Studentshavecompletedthelist extends Component { Teacherliststudentlist === undefined || Teacherliststudentlist.current_answer_user === undefined || Teacherliststudentlist.current_answer_user === null ?
              + style={{"margin": "0 auto", "padding-bottom": "100px", minWidth: " 1200px"}}> { - exercise_status === 0 || exercise_status === 1 ? + this.props.Commonheadofthetestpaper&&this.props.Commonheadofthetestpaper.exercise_status === 0 || this.props.Commonheadofthetestpaper&&this.props.Commonheadofthetestpaper.exercise_status === 1 ?
              @@ -2794,10 +2789,10 @@ class Studentshavecompletedthelist extends Component {
              { - exercise_status === 0 || exercise_status === 1 ? + this.props.Commonheadofthetestpaper&&this.props.Commonheadofthetestpaper.exercise_status === 0 || this.props.Commonheadofthetestpaper&&this.props.Commonheadofthetestpaper.exercise_status === 1 ?
              From 794d35968da5e0632d989f3839fd438b9025034d 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, 25 Sep 2019 17:32:19 +0800 Subject: [PATCH 49/52] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/AppConfig.js | 4 ++-- .../src/modules/courses/Resource/Fileslistitem.js | 7 ++++++- .../src/modules/courses/boards/BoardsListItem.js | 7 ++++++- .../modules/courses/busyWork/CommonWorkItem.js | 7 ++++++- .../modules/courses/exercise/ExerciseListItem.js | 7 ++++++- .../courses/graduation/tasks/GraduateTaskItem.js | 7 ++++++- .../graduation/topics/GraduateTopicItem.js | 7 ++++++- .../src/modules/courses/poll/PollListItem.js | 7 ++++++- .../courses/shixunHomework/ShixunhomeWorkItem.js | 7 ++++++- .../src/modules/paths/PathDetail/DetailCards.js | 7 ++++++- .../src/modules/paths/PathDetail/DetailTop.js | 14 ++++++++++++-- public/react/src/modules/tpm/TPMBanner.js | 15 +++++++++++++++ .../tpm/shixunchild/Challenges/Challenges.js | 6 ++++++ 13 files changed, 89 insertions(+), 13 deletions(-) diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index 025db7f5c..4de5d9d88 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -83,9 +83,9 @@ export function initAxiosInterceptors(props) { } config.url = `${proxy}${url}`; if (config.url.indexOf('?') == -1) { - config.url = `${config.url}?debug=${debugType}` + config.url = `${config.url}?debug=${'student'}` } else { - config.url = `${config.url}&debug=${debugType}` + config.url = `${config.url}&debug=${'student'}` } } else { // 加api前缀 diff --git a/public/react/src/modules/courses/Resource/Fileslistitem.js b/public/react/src/modules/courses/Resource/Fileslistitem.js index 1e37ae370..109403a3a 100644 --- a/public/react/src/modules/courses/Resource/Fileslistitem.js +++ b/public/react/src/modules/courses/Resource/Fileslistitem.js @@ -32,7 +32,12 @@ class Fileslistitem extends Component{ this.props.showLoginDialog() return } - + if(this.props.checkIfProfileCompleted()===false){ + this.setState({ + AccountProfiletype:true + }) + return + } if(this.props.checkIfProfessionalCertification()===false){ this.props.showProfileCompleteDialog() return diff --git a/public/react/src/modules/courses/boards/BoardsListItem.js b/public/react/src/modules/courses/boards/BoardsListItem.js index 3b245f557..a7d6a37e3 100644 --- a/public/react/src/modules/courses/boards/BoardsListItem.js +++ b/public/react/src/modules/courses/boards/BoardsListItem.js @@ -14,7 +14,12 @@ class BoardsListItem extends Component{ this.props.showLoginDialog() return } - + if(this.props.checkIfProfileCompleted()===false){ + this.setState({ + AccountProfiletype:true + }) + return + } if(this.props.checkIfProfessionalCertification()===false){ this.props.showProfileCompleteDialog() return diff --git a/public/react/src/modules/courses/busyWork/CommonWorkItem.js b/public/react/src/modules/courses/busyWork/CommonWorkItem.js index 3eb30518b..1a25dde62 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkItem.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkItem.js @@ -21,7 +21,12 @@ class CommonWorkItem extends Component{ this.props.showLoginDialog() return } - + if(this.props.checkIfProfileCompleted()===false){ + this.setState({ + AccountProfiletype:true + }) + return + } if(this.props.checkIfProfessionalCertification()===false){ this.props.showProfileCompleteDialog() return diff --git a/public/react/src/modules/courses/exercise/ExerciseListItem.js b/public/react/src/modules/courses/exercise/ExerciseListItem.js index 7fea267b6..e8277a438 100644 --- a/public/react/src/modules/courses/exercise/ExerciseListItem.js +++ b/public/react/src/modules/courses/exercise/ExerciseListItem.js @@ -58,7 +58,12 @@ class ExerciseListItem extends Component{ this.props.showLoginDialog() return } - + if(this.props.checkIfProfileCompleted()===false){ + this.setState({ + AccountProfiletype:true + }) + return + } if(this.props.checkIfProfessionalCertification()===false){ this.props.showProfileCompleteDialog() return diff --git a/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js b/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js index 36c7c1978..40dc3792a 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js @@ -140,7 +140,12 @@ class GraduateTaskItem extends Component{ this.props.showLoginDialog() return } - + if(this.props.checkIfProfileCompleted()===false){ + this.setState({ + AccountProfiletype:true + }) + return + } if(this.props.checkIfProfessionalCertification()===false){ this.props.showProfileCompleteDialog() return diff --git a/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js b/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js index c549d277a..fc9b00c23 100644 --- a/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js +++ b/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js @@ -20,7 +20,12 @@ class GraduateTopicItem extends Component{ this.props.showLoginDialog("iscancel") return } - + if(this.props.checkIfProfileCompleted()===false){ + this.setState({ + AccountProfiletype:true + }) + return + } if(this.props.checkIfProfessionalCertification()===false){ this.props.showProfileCompleteDialog() return diff --git a/public/react/src/modules/courses/poll/PollListItem.js b/public/react/src/modules/courses/poll/PollListItem.js index 59c5e3fa0..ae79b8afb 100644 --- a/public/react/src/modules/courses/poll/PollListItem.js +++ b/public/react/src/modules/courses/poll/PollListItem.js @@ -21,7 +21,12 @@ class PollListItem extends Component{ this.props.showLoginDialog() return } - + if(this.props.checkIfProfileCompleted()===false){ + this.setState({ + AccountProfiletype:true + }) + return + } if(this.props.checkIfProfessionalCertification()===false){ this.props.showProfileCompleteDialog() return diff --git a/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js b/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js index e7d29b1a8..be49ad00a 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js @@ -150,7 +150,12 @@ class ShixunhomeWorkItem extends Component{ this.props.showLoginDialog() return } - + if(this.props.checkIfProfileCompleted()===false){ + this.setState({ + AccountProfiletype:true + }) + return + } if(this.props.checkIfProfessionalCertification()===false){ this.props.showProfileCompleteDialog() return diff --git a/public/react/src/modules/paths/PathDetail/DetailCards.js b/public/react/src/modules/paths/PathDetail/DetailCards.js index 21c3ab6d8..9910b7f7b 100644 --- a/public/react/src/modules/paths/PathDetail/DetailCards.js +++ b/public/react/src/modules/paths/PathDetail/DetailCards.js @@ -199,7 +199,12 @@ class DetailCards extends Component{ this.props.showLoginDialog() return } - + if(this.props.checkIfProfileCompleted()===false){ + this.setState({ + AccountProfiletype:true + }) + return + } if(this.props.checkIfProfessionalCertification()===false){ this.props.showProfileCompleteDialog() return diff --git a/public/react/src/modules/paths/PathDetail/DetailTop.js b/public/react/src/modules/paths/PathDetail/DetailTop.js index 3613e510d..bc5e7e0d6 100644 --- a/public/react/src/modules/paths/PathDetail/DetailTop.js +++ b/public/react/src/modules/paths/PathDetail/DetailTop.js @@ -248,7 +248,12 @@ class DetailTop extends Component{ this.props.showLoginDialog() return } - + if(this.props.checkIfProfileCompleted()===false){ + this.setState({ + AccountProfiletype:true + }) + return + } if(this.props.checkIfProfessionalCertification()===false){ this.props.showProfileCompleteDialog() return @@ -267,7 +272,12 @@ class DetailTop extends Component{ this.props.showLoginDialog() return } - + if(this.props.checkIfProfileCompleted()===false){ + this.setState({ + AccountProfiletype:true + }) + return + } if(this.props.checkIfProfessionalCertification()===false){ this.props.showProfileCompleteDialog() return diff --git a/public/react/src/modules/tpm/TPMBanner.js b/public/react/src/modules/tpm/TPMBanner.js index 881e24361..515f71f7f 100644 --- a/public/react/src/modules/tpm/TPMBanner.js +++ b/public/react/src/modules/tpm/TPMBanner.js @@ -167,6 +167,14 @@ class TPMBanner extends Component { this.props.showLoginDialog() return } + + if(this.props.checkIfProfileCompleted()===false){ + this.setState({ + AccountProfiletype:true + }) + return + } + if(this.props.checkIfProfessionalCertification()===false){ this.setState({ AccountProfiletype:true @@ -390,6 +398,13 @@ class TPMBanner extends Component { return } + if(this.props.checkIfProfileCompleted()===false){ + this.setState({ + AccountProfiletype:true + }) + return + } + if(this.props.checkIfProfessionalCertification()===false){ this.setState({ AccountProfiletype:true diff --git a/public/react/src/modules/tpm/shixunchild/Challenges/Challenges.js b/public/react/src/modules/tpm/shixunchild/Challenges/Challenges.js index 0bbe3581f..c48a7b427 100644 --- a/public/react/src/modules/tpm/shixunchild/Challenges/Challenges.js +++ b/public/react/src/modules/tpm/shixunchild/Challenges/Challenges.js @@ -227,6 +227,12 @@ class Challenges extends Component { return } + if(this.props.checkIfProfileCompleted()===false){ + this.setState({ + AccountProfiletype:true + }) + return + } if(this.props.checkIfProfessionalCertification()===false){ this.setState({ From 8e1e4e6ef244cd5539f5e9329222b43a0c48acc2 Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Wed, 25 Sep 2019 17:39:13 +0800 Subject: [PATCH 50/52] =?UTF-8?q?=E6=81=A2=E5=A4=8D=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/games_controller.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/app/controllers/games_controller.rb b/app/controllers/games_controller.rb index 709b4edfd..be8173b2f 100644 --- a/app/controllers/games_controller.rb +++ b/app/controllers/games_controller.rb @@ -431,7 +431,6 @@ class GamesController < ApplicationController # params[:status] 1: 目录树点击的请求 0:正常自动加载 # 返回参数status : -1 系统统一报错提示;-3 需要轮训重试,带retry参数;-4 立即重试 def rep_content - raise("666") challenge_path = @game.challenge.try(:path) if challenge_path.blank? tip_exception("代码获取异常,请检查实训模板的评测设置是否正确") From 242d3531855ed761e5fac24dd47f60329c085758 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Wed, 25 Sep 2019 18:07:28 +0800 Subject: [PATCH 51/52] cm.focus() --- public/editormd/plugins/image-dialog/image-dialog.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/editormd/plugins/image-dialog/image-dialog.js b/public/editormd/plugins/image-dialog/image-dialog.js index 6da63f1e5..708fd8881 100644 --- a/public/editormd/plugins/image-dialog/image-dialog.js +++ b/public/editormd/plugins/image-dialog/image-dialog.js @@ -113,13 +113,13 @@ } this.hide().lockScreen(false).hideMask(); - + cm.focus && cm.focus() return false; }], cancel : [lang.buttons.cancel, function() { this.hide().lockScreen(false).hideMask(); - + cm.focus && cm.focus() return false; }] } From 64149719a5f78ad93ecec56024dd7cf1c3f8dc7c 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, 25 Sep 2019 18:08:17 +0800 Subject: [PATCH 52/52] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/courses/Resource/Fileslistitem.js | 20 +++++----- .../modules/courses/boards/BoardsListItem.js | 20 +++++----- .../courses/busyWork/CommonWorkItem.js | 20 +++++----- .../courses/exercise/ExerciseListItem.js | 20 +++++----- .../graduation/tasks/GraduateTaskItem.js | 20 +++++----- .../graduation/topics/GraduateTopicItem.js | 22 +++++----- .../src/modules/courses/poll/PollListItem.js | 20 +++++----- .../shixunHomework/ShixunhomeWorkItem.js | 20 +++++----- .../modules/paths/PathDetail/DetailCards.js | 20 +++++----- .../src/modules/paths/PathDetail/DetailTop.js | 40 +++++++++---------- public/react/src/modules/tpm/TPMBanner.js | 38 +++++++++--------- .../tpm/shixunchild/Challenges/Challenges.js | 12 +++--- 12 files changed, 136 insertions(+), 136 deletions(-) diff --git a/public/react/src/modules/courses/Resource/Fileslistitem.js b/public/react/src/modules/courses/Resource/Fileslistitem.js index 109403a3a..fe0794a18 100644 --- a/public/react/src/modules/courses/Resource/Fileslistitem.js +++ b/public/react/src/modules/courses/Resource/Fileslistitem.js @@ -32,16 +32,16 @@ class Fileslistitem extends Component{ this.props.showLoginDialog() return } - if(this.props.checkIfProfileCompleted()===false){ - this.setState({ - AccountProfiletype:true - }) - return - } - if(this.props.checkIfProfessionalCertification()===false){ - this.props.showProfileCompleteDialog() - return - } + // if(this.props.checkIfProfileCompleted()===false){ + // this.setState({ + // AccountProfiletype:true + // }) + // return + // } + // if(this.props.checkIfProfessionalCertification()===false){ + // this.props.showProfileCompleteDialog() + // return + // } if(list.is_history_file===false){ // this.props.DownloadFileA(list.title,list.url) diff --git a/public/react/src/modules/courses/boards/BoardsListItem.js b/public/react/src/modules/courses/boards/BoardsListItem.js index a7d6a37e3..a833f4c39 100644 --- a/public/react/src/modules/courses/boards/BoardsListItem.js +++ b/public/react/src/modules/courses/boards/BoardsListItem.js @@ -14,16 +14,16 @@ class BoardsListItem extends Component{ this.props.showLoginDialog() return } - if(this.props.checkIfProfileCompleted()===false){ - this.setState({ - AccountProfiletype:true - }) - return - } - if(this.props.checkIfProfessionalCertification()===false){ - this.props.showProfileCompleteDialog() - return - } + // if(this.props.checkIfProfileCompleted()===false){ + // this.setState({ + // AccountProfiletype:true + // }) + // return + // } + // if(this.props.checkIfProfessionalCertification()===false){ + // this.props.showProfileCompleteDialog() + // return + // } const isAdminOrStudent = this.props.isAdminOrStudent(); if (!isAdminOrStudent && discussMessage.is_public == false) { diff --git a/public/react/src/modules/courses/busyWork/CommonWorkItem.js b/public/react/src/modules/courses/busyWork/CommonWorkItem.js index 1a25dde62..0aebad415 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkItem.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkItem.js @@ -21,16 +21,16 @@ class CommonWorkItem extends Component{ this.props.showLoginDialog() return } - if(this.props.checkIfProfileCompleted()===false){ - this.setState({ - AccountProfiletype:true - }) - return - } - if(this.props.checkIfProfessionalCertification()===false){ - this.props.showProfileCompleteDialog() - return - } + // if(this.props.checkIfProfileCompleted()===false){ + // this.setState({ + // AccountProfiletype:true + // }) + // return + // } + // if(this.props.checkIfProfessionalCertification()===false){ + // this.props.showProfileCompleteDialog() + // return + // } const isStudent = this.props.isStudent() if (isStudent) { diff --git a/public/react/src/modules/courses/exercise/ExerciseListItem.js b/public/react/src/modules/courses/exercise/ExerciseListItem.js index e8277a438..479c9710a 100644 --- a/public/react/src/modules/courses/exercise/ExerciseListItem.js +++ b/public/react/src/modules/courses/exercise/ExerciseListItem.js @@ -58,16 +58,16 @@ class ExerciseListItem extends Component{ this.props.showLoginDialog() return } - if(this.props.checkIfProfileCompleted()===false){ - this.setState({ - AccountProfiletype:true - }) - return - } - if(this.props.checkIfProfessionalCertification()===false){ - this.props.showProfileCompleteDialog() - return - } + // if(this.props.checkIfProfileCompleted()===false){ + // this.setState({ + // AccountProfiletype:true + // }) + // return + // } + // if(this.props.checkIfProfessionalCertification()===false){ + // this.props.showProfileCompleteDialog() + // return + // } this.props.history.push(url); } diff --git a/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js b/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js index 40dc3792a..8ed9bb5ea 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduateTaskItem.js @@ -140,16 +140,16 @@ class GraduateTaskItem extends Component{ this.props.showLoginDialog() return } - if(this.props.checkIfProfileCompleted()===false){ - this.setState({ - AccountProfiletype:true - }) - return - } - if(this.props.checkIfProfessionalCertification()===false){ - this.props.showProfileCompleteDialog() - return - } + // if(this.props.checkIfProfileCompleted()===false){ + // this.setState({ + // AccountProfiletype:true + // }) + // return + // } + // if(this.props.checkIfProfessionalCertification()===false){ + // this.props.showProfileCompleteDialog() + // return + // } this.props.history.push(url); } diff --git a/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js b/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js index fc9b00c23..2027cfb3a 100644 --- a/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js +++ b/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js @@ -17,19 +17,19 @@ class GraduateTopicItem extends Component{ toDetailPage=(topicId)=>{ if(this.props.checkIfLogin()===false){ - this.props.showLoginDialog("iscancel") - return - } - if(this.props.checkIfProfileCompleted()===false){ - this.setState({ - AccountProfiletype:true - }) - return - } - if(this.props.checkIfProfessionalCertification()===false){ - this.props.showProfileCompleteDialog() + this.props.showLoginDialog() return } + // if(this.props.checkIfProfileCompleted()===false){ + // this.setState({ + // AccountProfiletype:true + // }) + // return + // } + // if(this.props.checkIfProfessionalCertification()===false){ + // this.props.showProfileCompleteDialog() + // return + // } let courseId=this.props.match.params.coursesId; this.props.history.push(`/courses/${courseId}/graduation_topics/${topicId}/detail`); diff --git a/public/react/src/modules/courses/poll/PollListItem.js b/public/react/src/modules/courses/poll/PollListItem.js index ae79b8afb..b4c2f108e 100644 --- a/public/react/src/modules/courses/poll/PollListItem.js +++ b/public/react/src/modules/courses/poll/PollListItem.js @@ -21,16 +21,16 @@ class PollListItem extends Component{ this.props.showLoginDialog() return } - if(this.props.checkIfProfileCompleted()===false){ - this.setState({ - AccountProfiletype:true - }) - return - } - if(this.props.checkIfProfessionalCertification()===false){ - this.props.showProfileCompleteDialog() - return - } + // if(this.props.checkIfProfileCompleted()===false){ + // this.setState({ + // AccountProfiletype:true + // }) + // return + // } + // if(this.props.checkIfProfessionalCertification()===false){ + // this.props.showProfileCompleteDialog() + // return + // } this.props.history.push(url); } diff --git a/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js b/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js index be49ad00a..74692dcb8 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js @@ -150,16 +150,16 @@ class ShixunhomeWorkItem extends Component{ this.props.showLoginDialog() return } - if(this.props.checkIfProfileCompleted()===false){ - this.setState({ - AccountProfiletype:true - }) - return - } - if(this.props.checkIfProfessionalCertification()===false){ - this.props.showProfileCompleteDialog() - return - } + // if(this.props.checkIfProfileCompleted()===false){ + // this.setState({ + // AccountProfiletype:true + // }) + // return + // } + // if(this.props.checkIfProfessionalCertification()===false){ + // this.props.showProfileCompleteDialog() + // return + // } this.props.history.push(url); diff --git a/public/react/src/modules/paths/PathDetail/DetailCards.js b/public/react/src/modules/paths/PathDetail/DetailCards.js index 9910b7f7b..d459694ef 100644 --- a/public/react/src/modules/paths/PathDetail/DetailCards.js +++ b/public/react/src/modules/paths/PathDetail/DetailCards.js @@ -199,16 +199,16 @@ class DetailCards extends Component{ this.props.showLoginDialog() return } - if(this.props.checkIfProfileCompleted()===false){ - this.setState({ - AccountProfiletype:true - }) - return - } - if(this.props.checkIfProfessionalCertification()===false){ - this.props.showProfileCompleteDialog() - return - } + // if(this.props.checkIfProfileCompleted()===false){ + // this.setState({ + // AccountProfiletype:true + // }) + // return + // } + // if(this.props.checkIfProfessionalCertification()===false){ + // this.props.showProfileCompleteDialog() + // return + // } let url = "/shixuns/" + id + "/shixun_exec.json"; diff --git a/public/react/src/modules/paths/PathDetail/DetailTop.js b/public/react/src/modules/paths/PathDetail/DetailTop.js index bc5e7e0d6..bf8c46e8f 100644 --- a/public/react/src/modules/paths/PathDetail/DetailTop.js +++ b/public/react/src/modules/paths/PathDetail/DetailTop.js @@ -248,16 +248,16 @@ class DetailTop extends Component{ this.props.showLoginDialog() return } - if(this.props.checkIfProfileCompleted()===false){ - this.setState({ - AccountProfiletype:true - }) - return - } - if(this.props.checkIfProfessionalCertification()===false){ - this.props.showProfileCompleteDialog() - return - } + // if(this.props.checkIfProfileCompleted()===false){ + // this.setState({ + // AccountProfiletype:true + // }) + // return + // } + // if(this.props.checkIfProfessionalCertification()===false){ + // this.props.showProfileCompleteDialog() + // return + // } this.setState({ @@ -272,16 +272,16 @@ class DetailTop extends Component{ this.props.showLoginDialog() return } - if(this.props.checkIfProfileCompleted()===false){ - this.setState({ - AccountProfiletype:true - }) - return - } - if(this.props.checkIfProfessionalCertification()===false){ - this.props.showProfileCompleteDialog() - return - } + // if(this.props.checkIfProfileCompleted()===false){ + // this.setState({ + // AccountProfiletype:true + // }) + // return + // } + // if(this.props.checkIfProfessionalCertification()===false){ + // this.props.showProfileCompleteDialog() + // return + // } this.setState({ Modalstype:true, diff --git a/public/react/src/modules/tpm/TPMBanner.js b/public/react/src/modules/tpm/TPMBanner.js index 515f71f7f..1a16e43d6 100644 --- a/public/react/src/modules/tpm/TPMBanner.js +++ b/public/react/src/modules/tpm/TPMBanner.js @@ -168,19 +168,19 @@ class TPMBanner extends Component { return } - if(this.props.checkIfProfileCompleted()===false){ - this.setState({ - AccountProfiletype:true - }) - return - } - - if(this.props.checkIfProfessionalCertification()===false){ - this.setState({ - AccountProfiletype:true - }) - return - } + // if(this.props.checkIfProfileCompleted()===false){ + // this.setState({ + // AccountProfiletype:true + // }) + // return + // } + // + // if(this.props.checkIfProfessionalCertification()===false){ + // this.setState({ + // AccountProfiletype:true + // }) + // return + // } let id = this.props.match.params.shixunId; let url="/shixuns/" + id +"/search_user_courses.json"; this.setState({ @@ -405,12 +405,12 @@ class TPMBanner extends Component { return } - if(this.props.checkIfProfessionalCertification()===false){ - this.setState({ - AccountProfiletype:true - }) - return - } + // if(this.props.checkIfProfessionalCertification()===false){ + // this.setState({ + // AccountProfiletype:true + // }) + // return + // } let {shixunsDetails} = this.props if( shixunsDetails.shixun_status>1){ diff --git a/public/react/src/modules/tpm/shixunchild/Challenges/Challenges.js b/public/react/src/modules/tpm/shixunchild/Challenges/Challenges.js index c48a7b427..c956736a0 100644 --- a/public/react/src/modules/tpm/shixunchild/Challenges/Challenges.js +++ b/public/react/src/modules/tpm/shixunchild/Challenges/Challenges.js @@ -234,12 +234,12 @@ class Challenges extends Component { return } - if(this.props.checkIfProfessionalCertification()===false){ - this.setState({ - AccountProfiletype:true - }) - return - } + // if(this.props.checkIfProfessionalCertification()===false){ + // this.setState({ + // AccountProfiletype:true + // }) + // return + // } let { ChallengesDataList } = this.state;