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}
- />:""}
+