|
|
|
@ -80,6 +80,8 @@ class GraduationTaskssettingapp extends Component{
|
|
|
|
|
starttime:undefined,
|
|
|
|
|
DownloadType:false,
|
|
|
|
|
DownloadMessageval:undefined,
|
|
|
|
|
commentstatustype:undefined,
|
|
|
|
|
commenttimeone:undefined
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -102,10 +104,10 @@ class GraduationTaskssettingapp extends Component{
|
|
|
|
|
}
|
|
|
|
|
let starttype=false;
|
|
|
|
|
let endtype=false;
|
|
|
|
|
if(moment(result.data.publish_time)<moment()){
|
|
|
|
|
if(moment(result.data.publish_time)<=moment()){
|
|
|
|
|
starttype=true
|
|
|
|
|
}
|
|
|
|
|
if(moment(result.data.end_time)<moment()){
|
|
|
|
|
if(moment(result.data.end_time)<=moment()){
|
|
|
|
|
endtype=true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -130,6 +132,7 @@ class GraduationTaskssettingapp extends Component{
|
|
|
|
|
taskname: result.data.task_name,
|
|
|
|
|
coursename: result.data.course_name,
|
|
|
|
|
commentstatus: result.data.comment_status,
|
|
|
|
|
commentstatustype:result.data.status,
|
|
|
|
|
commentnum: result.data.comment_num,
|
|
|
|
|
operworks: result.data.open_work,
|
|
|
|
|
opergrade: result.data.open_score,
|
|
|
|
@ -345,26 +348,31 @@ class GraduationTaskssettingapp extends Component{
|
|
|
|
|
this.setState({
|
|
|
|
|
latetime:newlatetime,
|
|
|
|
|
crosscomment:true,
|
|
|
|
|
commenttime:newcommenttime
|
|
|
|
|
commenttime:newcommenttime,
|
|
|
|
|
commenttimeone:newcommenttime,
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
if(endtimetype===true){
|
|
|
|
|
this.setState({
|
|
|
|
|
crosscomment:true,
|
|
|
|
|
commenttime:newcommenttime
|
|
|
|
|
commenttime:newcommenttime,
|
|
|
|
|
commenttimeone:newcommenttime,
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
this.setState({
|
|
|
|
|
end_time:newlatetime,
|
|
|
|
|
crosscomment:true,
|
|
|
|
|
commenttime:newcommenttime
|
|
|
|
|
commenttime:newcommenttime,
|
|
|
|
|
commenttimeone:newcommenttime,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
funcrosscomment=(e)=>{
|
|
|
|
|
let {latetime,end_time,allowlate}=this.state;
|
|
|
|
|
let {latetime,end_time,allowlate,commenttime,commenttimeone}=this.state;
|
|
|
|
|
let commenttimetype=commenttime===null||commenttime==="";
|
|
|
|
|
|
|
|
|
|
let newlatetimea=moment(new Date()).add(7, 'days').format("YYYY-MM-DD HH:mm");
|
|
|
|
|
let newcommenttimea=moment(new Date()).format("YYYY-MM-DD HH:mm");
|
|
|
|
|
|
|
|
|
@ -377,26 +385,33 @@ class GraduationTaskssettingapp extends Component{
|
|
|
|
|
let newend_timed=moment(end_time).add(7, 'days').format("YYYY-MM-DD HH:mm");
|
|
|
|
|
let newcommenttimed=moment(end_time).add(8, 'days').format("YYYY-MM-DD HH:mm");
|
|
|
|
|
|
|
|
|
|
let newtime;
|
|
|
|
|
if(e.target.checked===true){
|
|
|
|
|
|
|
|
|
|
if(allowlate===1||allowlate===true){
|
|
|
|
|
if(latetime===null||latetime===""){
|
|
|
|
|
this.updatesfuncrosscomment(1,newlatetimea,newcommenttimea)
|
|
|
|
|
}else{
|
|
|
|
|
this.updatesfuncrosscomment(1,newlatetimes,newcommenttimes)
|
|
|
|
|
}
|
|
|
|
|
}else{
|
|
|
|
|
if(end_time===null||end_time===""){
|
|
|
|
|
this.updatesfuncrosscomment(2,newend_timeb,newcommenttimeb)
|
|
|
|
|
if(commenttimetype===true){
|
|
|
|
|
|
|
|
|
|
if(allowlate===1||allowlate===true){
|
|
|
|
|
if(latetime===null||latetime===""){
|
|
|
|
|
this.updatesfuncrosscomment(1,newlatetimea,newcommenttimea)
|
|
|
|
|
}else{
|
|
|
|
|
this.updatesfuncrosscomment(1,newlatetimes,newcommenttimes)
|
|
|
|
|
}
|
|
|
|
|
}else{
|
|
|
|
|
if(end_time===null||end_time===""){
|
|
|
|
|
this.updatesfuncrosscomment(2,newend_timeb,newcommenttimeb)
|
|
|
|
|
}else{
|
|
|
|
|
this.updatesfuncrosscomment(2,newend_timed,newcommenttimed)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}else{
|
|
|
|
|
this.updatesfuncrosscomment(2,newend_timed,newcommenttimed)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.setState({
|
|
|
|
|
crosscomment:e.target.checked,
|
|
|
|
|
commenttime:commenttimeone,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
this.setState({
|
|
|
|
|
crosscomment:e.target.checked,
|
|
|
|
|
commenttime:undefined
|
|
|
|
|
commenttime:undefined
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -519,7 +534,7 @@ class GraduationTaskssettingapp extends Component{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(moment(end_time)<moment(publish_time)){
|
|
|
|
|
if(moment(end_time)<=moment(publish_time)){
|
|
|
|
|
this.setState({
|
|
|
|
|
endTimetypes:true,
|
|
|
|
|
endTimetypesval:"截止时间不能早于发布时间"
|
|
|
|
@ -531,13 +546,13 @@ class GraduationTaskssettingapp extends Component{
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(moment(latetime)<moment(publish_time)){
|
|
|
|
|
if(moment(latetime)<=moment(publish_time)){
|
|
|
|
|
this.setState({
|
|
|
|
|
latetimetype:true,
|
|
|
|
|
latetimetypeval:"结束时间不能早于发布时间"
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}else if(moment(latetime)<moment(end_time)){
|
|
|
|
|
}else if(moment(latetime)<=moment(end_time)){
|
|
|
|
|
this.setState({
|
|
|
|
|
latetimetype:true,
|
|
|
|
|
latetimetypeval:"结束时间不能早于截止时间"
|
|
|
|
@ -562,7 +577,7 @@ class GraduationTaskssettingapp extends Component{
|
|
|
|
|
commenttimetype:false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if(moment(this.state.commenttime)<moment(publish_time)){
|
|
|
|
|
if(moment(this.state.commenttime)<=moment(publish_time)){
|
|
|
|
|
this.setState({
|
|
|
|
|
commenttimetype:true,
|
|
|
|
|
commenttimevalue:"开始时间不能小于发布时间",
|
|
|
|
@ -574,7 +589,7 @@ class GraduationTaskssettingapp extends Component{
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(moment(this.state.commenttime)<moment(end_time)){
|
|
|
|
|
if(moment(this.state.commenttime)<=moment(end_time)){
|
|
|
|
|
this.setState({
|
|
|
|
|
commenttimetype:true,
|
|
|
|
|
commenttimevalue:"开始时间不能小于截止时间",
|
|
|
|
@ -918,7 +933,8 @@ class GraduationTaskssettingapp extends Component{
|
|
|
|
|
endtimetype,
|
|
|
|
|
commenttimetype,
|
|
|
|
|
commenttimevalue,
|
|
|
|
|
flagPageEdit
|
|
|
|
|
flagPageEdit,
|
|
|
|
|
commentstatustype
|
|
|
|
|
} =this.state;
|
|
|
|
|
|
|
|
|
|
let courseId=this.props.match.params.coursesId;
|
|
|
|
@ -1154,7 +1170,7 @@ class GraduationTaskssettingapp extends Component{
|
|
|
|
|
<div className={" font-16 color-dark h20 mb20"}>评分设置 </div>
|
|
|
|
|
<div className={"font-16 h20 mb20"}>最终成绩组成 <span className={"font-14 color-grey-c"}>(取各教师最终评分的平均分)</span></div>
|
|
|
|
|
<Checkbox className="ml40 font-16" checked={crosscomment} onChange={this.funcrosscomment}
|
|
|
|
|
disabled={this.props.isAdmin()===true?flagPageEdit===true?false:true:true} >启用交叉评阅 <span className={"font-14 color-grey-c"}>(给老师分配其他指导老师的学生作品)</span>
|
|
|
|
|
disabled={this.props.isAdmin()===true?flagPageEdit===true?commentstatustype===3?true:false:true:true} >启用交叉评阅 <span className={"font-14 color-grey-c"}>(给老师分配其他指导老师的学生作品)</span>
|
|
|
|
|
</Checkbox>
|
|
|
|
|
{crosscomment===true?<div>
|
|
|
|
|
<div className={"h20 mb30 ml30 mt20 ml87"}>
|
|
|
|
|