|
|
|
@ -117,7 +117,7 @@ class Addcourses extends Component{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
hidetojoinclass=()=>{
|
|
|
|
|
|
|
|
|
|
let {Addcoursestype}=this.props;
|
|
|
|
|
// console.log(this.props)
|
|
|
|
|
this.setState({
|
|
|
|
|
invite_code:undefined,
|
|
|
|
@ -132,11 +132,16 @@ class Addcourses extends Component{
|
|
|
|
|
student:null,
|
|
|
|
|
Addcoursestypes:false
|
|
|
|
|
})
|
|
|
|
|
this.props.hideAddcoursestype();
|
|
|
|
|
|
|
|
|
|
if(Addcoursestype===true){
|
|
|
|
|
this.props.hideAddcoursestype();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
submitasyn=(course_id)=>{
|
|
|
|
|
let{professor}=this.state;
|
|
|
|
|
let{professor,Addcoursestype}=this.state;
|
|
|
|
|
|
|
|
|
|
if(professor===1){
|
|
|
|
|
this.setState({
|
|
|
|
|
loadtype:true,
|
|
|
|
@ -145,13 +150,17 @@ class Addcourses extends Component{
|
|
|
|
|
modalSave:(course_id)=>this.submitasyns(course_id),
|
|
|
|
|
Addcoursestype:false
|
|
|
|
|
})
|
|
|
|
|
this.props.hideAddcoursestype();
|
|
|
|
|
if(Addcoursestype===true){
|
|
|
|
|
this.props.hideAddcoursestype();
|
|
|
|
|
}
|
|
|
|
|
}else{
|
|
|
|
|
// let{course_id}=this.state;
|
|
|
|
|
this.setState({
|
|
|
|
|
Addcoursestype:false
|
|
|
|
|
})
|
|
|
|
|
this.props.hideAddcoursestype();
|
|
|
|
|
if(Addcoursestype===true){
|
|
|
|
|
this.props.hideAddcoursestype();
|
|
|
|
|
}
|
|
|
|
|
window.location.href ="/courses/"+course_id+"/students";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -161,6 +170,7 @@ class Addcourses extends Component{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
submittojoinclass=()=>{
|
|
|
|
|
let{Addcoursestype}=this.state;
|
|
|
|
|
this.setState({
|
|
|
|
|
isSpin:true
|
|
|
|
|
})
|
|
|
|
@ -207,7 +217,9 @@ class Addcourses extends Component{
|
|
|
|
|
message:"提示",
|
|
|
|
|
description:response.data.message
|
|
|
|
|
});
|
|
|
|
|
this.props.hideAddcoursestype();
|
|
|
|
|
if(Addcoursestype===true){
|
|
|
|
|
this.props.hideAddcoursestype();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// this.props.showNotification(response.data.message);
|
|
|
|
|
|
|
|
|
@ -220,7 +232,9 @@ class Addcourses extends Component{
|
|
|
|
|
this.setState({
|
|
|
|
|
Addcoursestype:false
|
|
|
|
|
})
|
|
|
|
|
this.props.hideAddcoursestype();
|
|
|
|
|
if(Addcoursestype===true){
|
|
|
|
|
this.props.hideAddcoursestype();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// this.setState({
|
|
|
|
@ -318,7 +332,7 @@ class Addcourses extends Component{
|
|
|
|
|
keyboard={false}
|
|
|
|
|
className={"HomeworkModal"}
|
|
|
|
|
title="加入课堂"
|
|
|
|
|
visible={Addcoursestype===undefined?Addcoursestypes:Addcoursestype}
|
|
|
|
|
visible={Addcoursestype===undefined||Addcoursestype===false?Addcoursestypes:Addcoursestype}
|
|
|
|
|
closable={false}
|
|
|
|
|
footer={null}
|
|
|
|
|
destroyOnClose={true}
|
|
|
|
|