|
|
@ -637,12 +637,12 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
//允许补交
|
|
|
|
//允许补交
|
|
|
|
onChanges = (e) => {
|
|
|
|
onChanges = (e) => {
|
|
|
|
console.log("640");
|
|
|
|
// console.log("640");
|
|
|
|
console.log(this.state.end_time);
|
|
|
|
// console.log(this.state.end_time);
|
|
|
|
if(e.target.value ==="允许补交"){
|
|
|
|
if(e.target.value ==="允许补交"){
|
|
|
|
if(this.state.end_time !== null && this.state.end_time!== undefined){
|
|
|
|
if(this.state.end_time !== null && this.state.end_time!== undefined){
|
|
|
|
// console.log(this.state.end_time);
|
|
|
|
// console.log(this.state.end_time);
|
|
|
|
var times = this.state.end_time.format('YYYY-MM-DD HH:mm');
|
|
|
|
var times = this.state.deadline.format('YYYY-MM-DD HH:mm');
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
late_time:moment(handleDateString(times)).add(1, 'months'),
|
|
|
|
late_time:moment(handleDateString(times)).add(1, 'months'),
|
|
|
|
late_times:moment(handleDateString(times)).add(1, 'months').format('YYYY-MM-DD HH:mm'),
|
|
|
|
late_times:moment(handleDateString(times)).add(1, 'months').format('YYYY-MM-DD HH:mm'),
|
|
|
@ -983,16 +983,19 @@ class Trainingjobsetting extends Component {
|
|
|
|
if (!startValue || !endValue) {
|
|
|
|
if (!startValue || !endValue) {
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return startValue.valueOf() > endValue.valueOf();
|
|
|
|
var endValues= moment(endValue).subtract(1, 'days');
|
|
|
|
|
|
|
|
return startValue.valueOf() > endValues.valueOf();
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
disabledEndDateend = (endValue) => {
|
|
|
|
disabledEndDateend = (endValue) => {
|
|
|
|
const startValue = this.state.publish_time;
|
|
|
|
const startValue = this.state.publish_time;
|
|
|
|
if (!endValue || !startValue) {
|
|
|
|
if (!endValue || !startValue) {
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return endValue.valueOf() <= startValue.valueOf();
|
|
|
|
var endValuesys= moment(startValue).subtract(1, 'days');
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return endValue.valueOf() <= endValuesys.valueOf();
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
disabledEndDateendd = (endsValue) => {
|
|
|
|
disabledEndDateendd = (endsValue) => {
|
|
|
|
const endValues = this.state.end_time
|
|
|
|
const endValues = this.state.end_time
|
|
|
@ -1000,7 +1003,9 @@ class Trainingjobsetting extends Component {
|
|
|
|
if (!endsValue|| !endValues) {
|
|
|
|
if (!endsValue|| !endValues) {
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return endsValue.valueOf() <= endValues.valueOf();
|
|
|
|
var endValuesyss= moment(endValues).subtract(1, 'days');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return endsValue.valueOf() <= endValuesyss.valueOf();
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1156,13 +1161,15 @@ class Trainingjobsetting extends Component {
|
|
|
|
deadline:undefined,
|
|
|
|
deadline:undefined,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|
|
|
|
// console.log(moment(value, "YYYY-MM-DD HH:mm"));
|
|
|
|
|
|
|
|
// console.log(moment(this.state.publish_time, "YYYY-MM-DD HH:mm"));
|
|
|
|
if (moment(value, "YYYY-MM-DD HH:mm") <= moment(this.state.publish_time, "YYYY-MM-DD HH:mm")) {
|
|
|
|
if (moment(value, "YYYY-MM-DD HH:mm") <= moment(this.state.publish_time, "YYYY-MM-DD HH:mm")) {
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
unit_e_tip: "截止时间不能早于发布时间",
|
|
|
|
unit_e_tip: "截止时间不能早于发布时间",
|
|
|
|
p_flag: true,
|
|
|
|
p_flag: true,
|
|
|
|
borredss:"bor-reds",
|
|
|
|
borredss:"bor-reds",
|
|
|
|
end_time:undefined,
|
|
|
|
end_time:value.format('YYYY-MM-DD HH:mm'),
|
|
|
|
deadline:undefined,
|
|
|
|
deadline:value.format('YYYY-MM-DD HH:mm'),
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
return
|
|
|
|
return
|
|
|
@ -1180,8 +1187,8 @@ class Trainingjobsetting extends Component {
|
|
|
|
// this.onChangedata('end_time', value, dateString);
|
|
|
|
// this.onChangedata('end_time', value, dateString);
|
|
|
|
if(this.state.allowreplenishment === "允许补交"){
|
|
|
|
if(this.state.allowreplenishment === "允许补交"){
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
end_time:moment(handleDateString(dateString)).add(1, 'months'),
|
|
|
|
end_time:moment(handleDateString(dateString)),
|
|
|
|
deadline:moment(handleDateString(dateString)).add(1, 'months').format('YYYY-MM-DD HH:mm'),
|
|
|
|
deadline:moment(handleDateString(dateString)).format('YYYY-MM-DD HH:mm'),
|
|
|
|
late_time:moment(handleDateString(dateString)).add(2, 'months'),
|
|
|
|
late_time:moment(handleDateString(dateString)).add(2, 'months'),
|
|
|
|
late_times:moment(handleDateString(dateString)).add(2, 'months').format('YYYY-MM-DD HH:mm'),
|
|
|
|
late_times:moment(handleDateString(dateString)).add(2, 'months').format('YYYY-MM-DD HH:mm'),
|
|
|
|
})
|
|
|
|
})
|
|
|
@ -1199,7 +1206,7 @@ class Trainingjobsetting extends Component {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
let{publish_time,unifiedsetting,rulesdata}=this.state;
|
|
|
|
let{publish_time,end_time,unifiedsetting,rulesdata}=this.state;
|
|
|
|
|
|
|
|
|
|
|
|
if(unifiedsetting===true){
|
|
|
|
if(unifiedsetting===true){
|
|
|
|
if (moment(value, "YYYY-MM-DD HH:mm") <= moment(publish_time)) {
|
|
|
|
if (moment(value, "YYYY-MM-DD HH:mm") <= moment(publish_time)) {
|
|
|
@ -1207,20 +1214,30 @@ class Trainingjobsetting extends Component {
|
|
|
|
hand__e_tip: "补交时间不能早于发布时间",
|
|
|
|
hand__e_tip: "补交时间不能早于发布时间",
|
|
|
|
hand_flags: true,
|
|
|
|
hand_flags: true,
|
|
|
|
handclass:"bor-reds",
|
|
|
|
handclass:"bor-reds",
|
|
|
|
late_times:undefined,
|
|
|
|
late_times:value.format('YYYY-MM-DD HH:mm'),
|
|
|
|
late_time:undefined,
|
|
|
|
late_time:value.format('YYYY-MM-DD HH:mm'),
|
|
|
|
})
|
|
|
|
})
|
|
|
|
} else {
|
|
|
|
}
|
|
|
|
|
|
|
|
else if (moment(value, "YYYY-MM-DD HH:mm") <= moment(end_time)) {
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
hand__e_tip: "补交时间不能早于截止时间",
|
|
|
|
|
|
|
|
hand_flags: true,
|
|
|
|
|
|
|
|
handclass:"bor-reds",
|
|
|
|
|
|
|
|
late_times: value.format('YYYY-MM-DD HH:mm'),
|
|
|
|
|
|
|
|
late_time:value.format('YYYY-MM-DD HH:mm'),
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
late_times: value.format('YYYY-MM-DD HH:mm'),
|
|
|
|
late_times: value.format('YYYY-MM-DD HH:mm'),
|
|
|
|
|
|
|
|
late_time:value.format('YYYY-MM-DD HH:mm'),
|
|
|
|
hand__e_tip: "",
|
|
|
|
hand__e_tip: "",
|
|
|
|
hand_flags: false,
|
|
|
|
hand_flags: false,
|
|
|
|
handclass:"",
|
|
|
|
handclass:"",
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
this.onChangedata('late_time', value, dateString);
|
|
|
|
|
|
|
|
}catch (e) {
|
|
|
|
}catch (e) {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1241,11 +1258,11 @@ class Trainingjobsetting extends Component {
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
late_times: value.format('YYYY-MM-DD HH:mm'),
|
|
|
|
late_times: value.format('YYYY-MM-DD HH:mm'),
|
|
|
|
|
|
|
|
late_time:value.format('YYYY-MM-DD HH:mm'),
|
|
|
|
hand__e_tip: "",
|
|
|
|
hand__e_tip: "",
|
|
|
|
hand_flags: false,
|
|
|
|
hand_flags: false,
|
|
|
|
handclass:undefined,
|
|
|
|
handclass:undefined,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
this.onChangedata('late_time', value, dateString);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -1622,6 +1639,19 @@ class Trainingjobsetting extends Component {
|
|
|
|
{this.props.isAdmin()?this.state.code_review===false?"": <Link
|
|
|
|
{this.props.isAdmin()?this.state.code_review===false?"": <Link
|
|
|
|
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/student_work`}>代码查重</Link> : ""}
|
|
|
|
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/student_work`}>代码查重</Link> : ""}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<style>{
|
|
|
|
|
|
|
|
`
|
|
|
|
|
|
|
|
.poll_list a.active:after {
|
|
|
|
|
|
|
|
content: '';
|
|
|
|
|
|
|
|
width: 57px;
|
|
|
|
|
|
|
|
left: 10px;
|
|
|
|
|
|
|
|
bottom: 0px;
|
|
|
|
|
|
|
|
height: 2px;
|
|
|
|
|
|
|
|
background-color: #4CACFF;
|
|
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
`
|
|
|
|
|
|
|
|
}</style>
|
|
|
|
<Link className="active"
|
|
|
|
<Link className="active"
|
|
|
|
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/settings`}
|
|
|
|
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/settings`}
|
|
|
|
>设置</Link>
|
|
|
|
>设置</Link>
|
|
|
@ -1646,7 +1676,7 @@ class Trainingjobsetting extends Component {
|
|
|
|
<div className="stud-class-set bor-bottom-greyE edu-back-white">
|
|
|
|
<div className="stud-class-set bor-bottom-greyE edu-back-white">
|
|
|
|
<div className=" mt20 pl20">
|
|
|
|
<div className=" mt20 pl20">
|
|
|
|
<p className=" clearfix ">
|
|
|
|
<p className=" clearfix ">
|
|
|
|
<span className="font-16 fl "style={{"color":"#05101A"}}>发布设置 <span className="ml15 color-grey-9" style={{"font-size":"14px","text-align":"left"}}>(课堂管理员、教师、助教拥有设置权限)</span></span>
|
|
|
|
<span className="font-16 fl "style={{"color":"#05101A"}}>发布设置 <span className="ml15 color-grey-9" style={{"font-size":"14px","text-align":"left"}}>(选中则所有分班使用相同的发布设置,否则各个分班单独设置)</span></span>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
!flagPageEdit && this.props.isAdmin() === true ?
|
|
|
|
!flagPageEdit && this.props.isAdmin() === true ?
|
|
|
|
<a className="fr" onClick={this.editSetting}><Tooltip title="编辑"><i
|
|
|
|
<a className="fr" onClick={this.editSetting}><Tooltip title="编辑"><i
|
|
|
@ -1714,7 +1744,6 @@ class Trainingjobsetting extends Component {
|
|
|
|
<DatePicker
|
|
|
|
<DatePicker
|
|
|
|
showToday={false}
|
|
|
|
showToday={false}
|
|
|
|
id={"end_timeid"}
|
|
|
|
id={"end_timeid"}
|
|
|
|
disabledDate={this.disabledEndDateend}
|
|
|
|
|
|
|
|
disabledTime={disabledDateTime}
|
|
|
|
disabledTime={disabledDateTime}
|
|
|
|
showTime={{ format: 'HH:mm' }}
|
|
|
|
showTime={{ format: 'HH:mm' }}
|
|
|
|
className={borredss}
|
|
|
|
className={borredss}
|
|
|
@ -1795,7 +1824,6 @@ class Trainingjobsetting extends Component {
|
|
|
|
<DatePicker
|
|
|
|
<DatePicker
|
|
|
|
showToday={false}
|
|
|
|
showToday={false}
|
|
|
|
id={"late_timeid"}
|
|
|
|
id={"late_timeid"}
|
|
|
|
disabledDate={this.disabledEndDateendd}
|
|
|
|
|
|
|
|
disabledTime={disabledDateTime}
|
|
|
|
disabledTime={disabledDateTime}
|
|
|
|
format="YYYY-MM-DD HH:mm"
|
|
|
|
format="YYYY-MM-DD HH:mm"
|
|
|
|
value={late_time && moment(late_time, dataformat)}
|
|
|
|
value={late_time && moment(late_time, dataformat)}
|
|
|
@ -1841,7 +1869,7 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
<RadioGroup className="ml60 mt20" onChange={this.onChangeslevel} value={this.state.level}>
|
|
|
|
<RadioGroup className="ml60 mt20" onChange={this.onChangeslevel} value={this.state.level}>
|
|
|
|
<Radio style={radioStyle} disabled={!flagPageEdit} className="c_grey" value={"扣分"}>按查看答案级别扣分<span
|
|
|
|
<Radio style={radioStyle} disabled={!flagPageEdit} className="c_grey" value={"扣分"}>按查看答案级别扣分<span
|
|
|
|
className="color-grey-9 font-14 ml15" style={{"text-align":"left"}}>(根据学员选择查看的实训答案级别(解题思路、完整答案),扣减相应的分值)</span></Radio>
|
|
|
|
className="color-grey-9 font-14 ml15" style={{"text-align":"left"}}>根据学员选择查看的实训答案级别(解题思路、完整答案),扣减相应的分值</span></Radio>
|
|
|
|
<Radio style={radioStyle} disabled={!flagPageEdit} className="c_grey mt15"
|
|
|
|
<Radio style={radioStyle} disabled={!flagPageEdit} className="c_grey mt15"
|
|
|
|
value={"满分"}>不扣分 </Radio>
|
|
|
|
value={"满分"}>不扣分 </Radio>
|
|
|
|
</RadioGroup>
|
|
|
|
</RadioGroup>
|
|
|
@ -1855,7 +1883,7 @@ class Trainingjobsetting extends Component {
|
|
|
|
checked={this.state.completionefficiencyscore} style={{"color":"#666666"}}>效率分<span
|
|
|
|
checked={this.state.completionefficiencyscore} style={{"color":"#666666"}}>效率分<span
|
|
|
|
className={"font-14 color-grey-9 font-14 ml15"} style={{"text-align":"left"}}>(选中,则学生最终成绩包含效率分)</span></Checkbox>
|
|
|
|
className={"font-14 color-grey-9 font-14 ml15"} style={{"text-align":"left"}}>(选中,则学生最终成绩包含效率分)</span></Checkbox>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div className="ml80 mt20">
|
|
|
|
<div className="ml80 mt30">
|
|
|
|
<span className="c_grey mr10" style={{"color":"#999999"}}>分值</span>
|
|
|
|
<span className="c_grey mr10" style={{"color":"#999999"}}>分值</span>
|
|
|
|
<InputNumber min={0} disabled={!flagPageEdit} max={100} className="ml10 h40 mr10 color-grey-9"
|
|
|
|
<InputNumber min={0} disabled={!flagPageEdit} max={100} className="ml10 h40 mr10 color-grey-9"
|
|
|
|
style={{width: "100px","color":"#999999"}}
|
|
|
|
style={{width: "100px","color":"#999999"}}
|
|
|
@ -1902,7 +1930,7 @@ class Trainingjobsetting extends Component {
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{/*公开设置*/}
|
|
|
|
{/*公开设置*/}
|
|
|
|
<div className="stud-class-set bor-bottom-greyE bor-top-greyE edu-back-white mt35 ">
|
|
|
|
<div className="stud-class-set bor-top-greyE edu-back-white mt35 pb5 ">
|
|
|
|
<div className=" clearfix edu-back-white poll_list mt20">
|
|
|
|
<div className=" clearfix edu-back-white poll_list mt20">
|
|
|
|
<div className={"font-16 color-dark fl pl20 "} style={{"color":"#05101A"}}>公开设置</div>
|
|
|
|
<div className={"font-16 color-dark fl pl20 "} style={{"color":"#05101A"}}>公开设置</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -1914,7 +1942,6 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|