|
|
|
@ -34,6 +34,7 @@ class Testpapersettinghomepage extends Component{
|
|
|
|
|
DownloadType:false,
|
|
|
|
|
DownloadMessageval:undefined,
|
|
|
|
|
donwloading:false,
|
|
|
|
|
exercise_status:3,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//切换tab
|
|
|
|
@ -69,7 +70,8 @@ class Testpapersettinghomepage extends Component{
|
|
|
|
|
if(response.status === 200){
|
|
|
|
|
this.setState({
|
|
|
|
|
Commonheadofthetestpaper:response.data,
|
|
|
|
|
current_status:response.data.user_permission.current_status
|
|
|
|
|
current_status:response.data.user_permission.current_status,
|
|
|
|
|
exercise_status:response.data.exercise_status,
|
|
|
|
|
})
|
|
|
|
|
// console.log(JSON.stringify(response.data.show_statistic));
|
|
|
|
|
|
|
|
|
@ -262,11 +264,13 @@ class Testpapersettinghomepage extends Component{
|
|
|
|
|
this.props.history.goBack()
|
|
|
|
|
}
|
|
|
|
|
render(){
|
|
|
|
|
let {tab,visible,Commonheadofthetestpaper}=this.state;
|
|
|
|
|
let {tab,visible,Commonheadofthetestpaper,exercise_status}=this.state;
|
|
|
|
|
const isAdmin =this.props.isAdmin();
|
|
|
|
|
const isStudent = this.props.isStudent();
|
|
|
|
|
// TODO
|
|
|
|
|
|
|
|
|
|
// console.log(Commonheadofthetestpaper.exercise_status);
|
|
|
|
|
|
|
|
|
|
return(
|
|
|
|
|
<div className="newMain clearfix ">
|
|
|
|
|
{/*<DownloadMessage*/}
|
|
|
|
@ -413,7 +417,7 @@ class Testpapersettinghomepage extends Component{
|
|
|
|
|
<a className="fr color-blue font-16 mt20" onClick={()=>this.setgameexercise(`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/users/${this.props.current_user.login}`)}>开始答题</a>:
|
|
|
|
|
<Link className="fr color-blue font-16 mt20"
|
|
|
|
|
to={`/courses/${this.props.match.params.coursesId}/exercises/${this.props.match.params.Id}/users/${this.props.current_user.login}`}>
|
|
|
|
|
{Commonheadofthetestpaper && Commonheadofthetestpaper.exercise_status===3?"":Commonheadofthetestpaper && Commonheadofthetestpaper.exercise_status===4?"":start_Value[Commonheadofthetestpaper&&Commonheadofthetestpaper.user_permission.current_status]}
|
|
|
|
|
{exercise_status===2?"":exercise_status===3?"":exercise_status===4?"":start_Value[exercise_status]}
|
|
|
|
|
</Link>
|
|
|
|
|
:""}
|
|
|
|
|
|
|
|
|
|