{
+ debugger;
let{Addcoursestype}=this.state;
this.setState({
isSpin:true
})
let {invite_code,professor,assistant_professor,student}=this.state;
+ invite_code="MBTAP";
if(invite_code===undefined||invite_code===""){
this.setState({
invite_codetype:true,
@@ -269,13 +271,18 @@ class Addcourses extends Component{
this.props.history.push('/courses/2704/boards/8367/messages/42072')
return;
}
- if(response.data.course_id!=undefined){
- this.submitasyn(response.data.course_id)
- }
notification.open({
message:"提示",
description:response.data.message
- });
+ });
+ if(response.data.course_id!=undefined){
+ this.submitasyn(response.data.course_id)
+ }else{
+ // 无返回课程id则是选择的教师或者助教身份,成功后跳转到课堂首页
+ // console.log(this.props);
+ // console.log(this.props.history.push);
+ window.location.href="/courses";
+ }
if(Addcoursestype===true){
this.props.hideAddcoursestype();
}
diff --git a/public/react/src/modules/courses/new/CoursesNew.js b/public/react/src/modules/courses/new/CoursesNew.js
index 873b1d9d7..e599bfa93 100644
--- a/public/react/src/modules/courses/new/CoursesNew.js
+++ b/public/react/src/modules/courses/new/CoursesNew.js
@@ -73,8 +73,8 @@ class CoursesNew extends Component {
period: data.class_period===undefined?'':data.class_period===null?'':data.class_period===null?'':data.class_period==="null"?'':data.class_period+"",
credit: data.credit===undefined?'':data.credit===null?'':data.credit===null?'':data.credit==="null"?'':data.credit+"",
checkboxgroup: data.course_module_types,
- Realnamecertification: data.authentication,
- Professionalcertification:data.professional_certification,
+ // Realnamecertification: data.authentication,
+ // Professionalcertification:data.professional_certification,
endtime: data.end_date === undefined ? "" : moment(data.end_date, dateFormat),
school:data.school
@@ -84,8 +84,8 @@ class CoursesNew extends Component {
datatime: data.end_date,
dataname:data.name,
is_public: data.is_public === 1 ? true : false,
- Realnamecertification: data.authentication,
- Professionalcertification:data.professional_certification,
+ // Realnamecertification: data.authentication,
+ // Professionalcertification:data.professional_certification,
addonAfteronelenone: data.class_period===undefined?'':data.class_period===null?'':data.class_period===null?'':data.class_period==="null"?'':data.class_period,
addonAfteronelentwo:data.credit===undefined?'':data.credit===null?'':data.credit===null?'':data.credit==="null"?'':data.credit,
@@ -237,8 +237,8 @@ class CoursesNew extends Component {
end_date: datatime===undefined?"":datatime,
is_public: is_public === true || is_public === 1 ? 1 : 0,
course_module_types: values.checkboxgroup,
- authentication: this.state.Realnamecertification,
- professional_certification: this.state.Professionalcertification,
+ // authentication: this.state.Realnamecertification,
+ // professional_certification: this.state.Professionalcertification,
school:values.school
}
).then((response) => {
@@ -313,8 +313,8 @@ class CoursesNew extends Component {
end_date: datatime===undefined?"":datatime,
is_public: is_public === true || is_public === 1 ? 1 : 0,
course_module_types: values.checkboxgroup,
- authentication: this.state.Realnamecertification,
- professional_certification: this.state.Professionalcertification,
+ // authentication: this.state.Realnamecertification,
+ // professional_certification: this.state.Professionalcertification,
school:values.school
}
).then((response) => {
@@ -953,7 +953,7 @@ class CoursesNew extends Component {
)}
- */}
{
+ if(info.response){
let shixunId = this.props.match.params.shixunId;
let {message,filspath}=this.state;
if(message===""||message===undefined){
@@ -105,13 +109,20 @@ class RepositoryAddFileupload_files extends Component {
secret_repository:Repositoryflag
}})
.then((response) => {
- if (response.data.status == 0) {
- this.props.showNotification("删除成功")
+ if (response.data.status === 0) {
+ let fileList = this.state.fileList.filter(item=>item.uid !== info.uid);
+ this.setState({
+ fileList
+ })
+ this.props.showNotification("删除成功");
}
})
.catch(function (error) {
console.log(error);
});
+ }else{
+ this.props.showNotification("还未上传完成,无法进行删除操作!");
+ }
}
FormInput=(e)=>{
@@ -195,7 +206,7 @@ class RepositoryAddFileupload_files extends Component {
return false
}
- this.props.showNotification("上传成功")
+ // this.props.showNotification("上传成功");
},
};