|
|
|
@ -127,25 +127,25 @@ class ExerciseReviewAndAnswer extends Component{
|
|
|
|
|
}
|
|
|
|
|
//自动交卷
|
|
|
|
|
autoCommitExercise=()=>{
|
|
|
|
|
let eId=this.props.match.params.Id;
|
|
|
|
|
let url=`/exercises/${eId}/commit_exercise.json`;
|
|
|
|
|
axios.post(url,{
|
|
|
|
|
let eId=this.props.match.params.Id;
|
|
|
|
|
let url=`/exercises/${eId}/commit_exercise.json`;
|
|
|
|
|
axios.post(url,{
|
|
|
|
|
commit_method:2
|
|
|
|
|
}).then((result)=>{
|
|
|
|
|
if(result){
|
|
|
|
|
this.setState({
|
|
|
|
|
Modalstype:true,
|
|
|
|
|
Modalstopval:'答题结束了,系统已自动提交试卷',
|
|
|
|
|
modalsBottomval:"不能再修改答题",
|
|
|
|
|
ModalCancel:undefined,
|
|
|
|
|
ModalSave:this.sureCommit,
|
|
|
|
|
Loadtype:true
|
|
|
|
|
})
|
|
|
|
|
if(result){
|
|
|
|
|
this.setState({
|
|
|
|
|
Modalstype:true,
|
|
|
|
|
Modalstopval:'答题结束了,系统已自动提交试卷',
|
|
|
|
|
modalsBottomval:"不能再修改答题",
|
|
|
|
|
ModalCancel:undefined,
|
|
|
|
|
ModalSave:this.sureCommit,
|
|
|
|
|
Loadtype:true
|
|
|
|
|
})
|
|
|
|
|
this.props.showNotification(`${result.data.message}`);
|
|
|
|
|
}
|
|
|
|
|
}).catch((error)=>{
|
|
|
|
|
console.log(error);
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}).catch((error)=>{
|
|
|
|
|
console.log(error);
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
sureCommit=()=>{
|
|
|
|
|