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 01/28] =?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 02/28] =?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 03/28] =?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 04/28] =?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 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 05/28] =?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 06/28] =?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 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 09/28] =?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 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 10/28] =?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 031fc9f138792859db083c1f1d570ebfc09d5445 Mon Sep 17 00:00:00 2001 From: p31729568 Date: Wed, 25 Sep 2019 11:14:05 +0800 Subject: [PATCH 11/28] 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 12/28] =?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 13/28] =?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 14/28] =?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 15/28] =?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 16/28] 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 17/28] =?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 21/28] =?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 22/28] =?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 23/28] =?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 24/28] =?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 25/28] =?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 26/28] =?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 27/28] =?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 28/28] =?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({