|
|
|
@ -178,16 +178,9 @@ class Exercisesetting extends Component{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if(result.data.exercise.unified_setting == true && moment(result.data.exercise.end_time) <= moment()){
|
|
|
|
|
|
|
|
|
|
// if(this.props.isSuperAdmin()===true){
|
|
|
|
|
// this.setState({
|
|
|
|
|
// end_timetype:false
|
|
|
|
|
// })
|
|
|
|
|
// }else{
|
|
|
|
|
this.setState({
|
|
|
|
|
end_timetype:true
|
|
|
|
|
})
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let group=result.data.published_course_groups;
|
|
|
|
@ -236,10 +229,10 @@ class Exercisesetting extends Component{
|
|
|
|
|
//提交form表单
|
|
|
|
|
handleSubmit = (e) => {
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
if(this.props&&this.props.Commonheadofthetestpaper.exercise_status){
|
|
|
|
|
console.log("190");
|
|
|
|
|
console.log(this.props.Commonheadofthetestpaper.exercise_status);
|
|
|
|
|
}
|
|
|
|
|
// if(this.props&&this.props.Commonheadofthetestpaper.exercise_status){
|
|
|
|
|
// console.log("190");
|
|
|
|
|
// console.log(this.props.Commonheadofthetestpaper.exercise_status);
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
this.props.form.validateFieldsAndScroll((err, values) => {
|
|
|
|
|
if(!err){
|
|
|
|
@ -327,7 +320,7 @@ class Exercisesetting extends Component{
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(this.state.end_timetype === false){
|
|
|
|
|
if(this.state.end_timetype === false||this.props.isAdmin()==true){
|
|
|
|
|
if(moment(end_time,dataformat) <= moment(publish_time,dataformat)){
|
|
|
|
|
this.setState({
|
|
|
|
|
unit_e_tip:"截止时间不能小于发布时间"
|
|
|
|
@ -525,7 +518,7 @@ class Exercisesetting extends Component{
|
|
|
|
|
end_time:null
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
if(dateString<moment().format('YYYY-MM-DD HH:mm')){
|
|
|
|
|
if(dateString<=moment().format('YYYY-MM-DD HH:mm')){
|
|
|
|
|
this.setState({
|
|
|
|
|
unit_e_tip:"截止时间不能早于当前时间",
|
|
|
|
|
e_flag:true
|
|
|
|
|