dev_forum
杨树林 6 years ago
parent 4bac90ff73
commit 302e92d7b5

@ -550,6 +550,8 @@ class Listofworksstudentone extends Component {
}
}
// console.log("554");
// console.log(columns2);
this.setState({
@ -577,7 +579,7 @@ class Listofworksstudentone extends Component {
}
}
else if(this.props.isNotMember()===true&&item.title==="学号") {
if(this.props.isNotMember()===true&&item.title==="学号") {
}else{
arr.push(item);
@ -640,6 +642,8 @@ class Listofworksstudentone extends Component {
}
// console.log("datalistdatalist文件");
// console.log(datalist);
// console.log("645");
// console.log(columns2);
this.setState({
data: datalist,
teacherlist: teacherlist,
@ -835,7 +839,9 @@ class Listofworksstudentone extends Component {
}
render() {
let {visibles, game_list,columns, limit,experience, boolgalist,viewtrainingdata, teacherdata, page, data, jobsettingsdata, styletable, datas, order, loadingstate,computeTimetype} = this.state;
// console.log(this.state.data);
// console.log("841");
// console.log(this.state.columns);
return (
teacherdata === undefined || teacherdata.student_works === undefined || teacherdata.student_works === null || JSON.stringify(teacherdata.student_works) === "[]" ?
// 学生不能查看别人的
@ -1018,7 +1024,7 @@ class Listofworksstudentone extends Component {
}
`}</style>
<div className="edu-table edu-back-white ">
{data === undefined ? "" : <Table
{data === undefined ? "222222" : <Table
dataSource={data}
columns={columns}
pagination={false}

@ -221,7 +221,7 @@ class Trainingjobsetting extends Component {
deadline: result.data.end_time === undefined ? undefined : result.data.end_time === null ? undefined : result.data.end_time,
late_time: result.data.late_time === undefined ? undefined : result.data.late_time === null ? undefined : result.data.late_time,
late_times: result.data.late_time === undefined ? undefined : result.data.late_time === null ? undefined : result.data.late_time,
allowreplenishment: result.data.allow_late === true ? "允许补交" : "禁止补交",
allowreplenishment: result.data.allow_late,
latededuction: result.data.late_penalty,
level: result.data.answer_open_evaluation === true ? "满分" : "扣分",
completionefficiencyscore: result.data.work_efficiency,
@ -231,10 +231,6 @@ class Trainingjobsetting extends Component {
challenge_settings: result.data.challenge_settings,
code_review:result.data.code_review
})
}
})
@ -337,7 +333,7 @@ class Trainingjobsetting extends Component {
}
}
}
if (this.state.allowreplenishment === "允许补交") {
if (this.state.allowreplenishment === true) {
if (this.state.late_times === undefined || this.state.late_times === null || this.state.late_times === "") {
@ -409,7 +405,7 @@ class Trainingjobsetting extends Component {
if (this.state.allowreplenishment === "允许补交") {
if (this.state.allowreplenishment === true) {
if (this.state.latededuction === undefined) {
this.props.showNotification(`请输入迟交扣分数`);
@ -530,7 +526,7 @@ class Trainingjobsetting extends Component {
unified_setting: this.state.unifiedsetting, //统一配置
publish_time: moment(this.state.publish_time).format('YYYY-MM-DD HH:mm'), //发布时间
end_time: moment(this.state.end_time).format('YYYY-MM-DD HH:mm'), //截止时间
allow_late: this.state.allowreplenishment === "允许补交" ? true : false, //补交
allow_late: this.state.allowreplenishment, //补交
late_penalty: parseInt(this.state.latededuction), //迟交扣分
late_time: moment(this.state.late_time).format('YYYY-MM-DD HH:mm'), //结束时间
answer_open_evaluation: this.state.level === "满分" ? true : false, //扣分项
@ -546,7 +542,7 @@ class Trainingjobsetting extends Component {
data = {
unified_setting: this.state.unifiedsetting, //非统一配置
group_settings: this.state.rulesdata,
allow_late: this.state.allowreplenishment === "允许补交" ? true : false, //补交
allow_late: this.state.allowreplenishment, //补交
late_penalty: parseInt(this.state.latededuction), //迟交扣分
late_time: moment(this.state.late_time).format('YYYY-MM-DD HH:mm'), //结束时间
answer_open_evaluation: this.state.level === "满分" ? true : false, //扣分项
@ -651,9 +647,8 @@ class Trainingjobsetting extends Component {
//允许补交
onChanges = (e) => {
// console.log("640");
// console.log(this.state.end_time);
if(e.target.value ==="允许补交"){
if(e.target.checked ===true){
if(this.state.end_time !== null && this.state.end_time!== undefined){
// console.log(this.state.end_time);
// var times = this.state.deadline.format('YYYY-MM-DD HH:mm');
@ -665,16 +660,19 @@ class Trainingjobsetting extends Component {
this.setState({
allowreplenishment: e.target.value,
allowreplenishment: e.target.checked,
latededuction:5,
whethertopay:true,
})
}else {
this.setState({
allowreplenishment: e.target.value,
allowreplenishment: e.target.checked,
latededuction:0,
whethertopay:false,
hand__e_tip: "",
hand_flags: false,
handclass:"",
})
}
@ -1239,7 +1237,7 @@ class Trainingjobsetting extends Component {
this.setState({
publish_time:moment(handleDateString(dateString))
})
if(this.state.allowreplenishment === "允许补交") {
if(this.state.allowreplenishment === true) {
this.setState({
end_time:moment(handleDateString(dateString)).add(1, 'months'),
deadline:moment(handleDateString(dateString)).add(1, 'months').format('YYYY-MM-DD HH:mm'),
@ -1303,7 +1301,7 @@ class Trainingjobsetting extends Component {
end_time:moment(handleDateString(dateString))
})
// this.onChangedata('end_time', value, dateString);
if(this.state.allowreplenishment === "允许补交"){
if(this.state.allowreplenishment === true){
this.setState({
deadline:moment(handleDateString(dateString)).format('YYYY-MM-DD HH:mm'),
late_time:moment(handleDateString(dateString)).add(2, 'months'),
@ -1580,7 +1578,7 @@ class Trainingjobsetting extends Component {
if(moment(this.state.late_time,"YYYY-MM-DD HH:mm")<=moment()){
endtime=false;
}
if(this.state.allowreplenishment === "禁止补交"){
if(this.state.allowreplenishment === false){
whethertopays=false;
}
this.setState({
@ -1985,11 +1983,11 @@ class Trainingjobsetting extends Component {
<div className=" clearfix edu-back-white poll_list mt10">
<div className={"font-16 color-dark fl pl20 mt10 "} style={{"color":"#05101A"}}>补交设置</div>
</div>
<RadioGroup className="ml40 mt10" onChange={this.onChanges}
value={this.state.allowreplenishment}>
<Radio style={radioStyle} value={"允许补交"} disabled={!flagPageEdit}>允许补交 <span
className={"font-14 ml10 color-grey-9"} style={{"text-align":"left","font-size":"14px"}} >(选中则允许学生延时提交作品)</span></Radio>
{/*value={this.state.allowreplenishment}*/}
<div className="ml40 mt10"
>
<Checkbox style={radioStyle} value={"允许补交"} checked={this.state.allowreplenishment} onChange={this.onChanges} disabled={!flagPageEdit}>开启补交 <span
className={"font-14 ml10 color-grey-9"} style={{"text-align":"left","font-size":"14px"}} >(选中则允许学生延时提交作品)</span></Checkbox>
<div className={"h21 mb30 ml30 mt20"}>
<span style={{"width": "100px","color":"#999999"}}>迟交扣分</span>
@ -2049,8 +2047,8 @@ class Trainingjobsetting extends Component {
}
</p>
</div>
<Radio style={radioStyle} value={"禁止补交"} disabled={!flagPageEdit}>禁止补交</Radio>
</RadioGroup>
{/*<Radio style={radioStyle} value={"禁止补交"} disabled={!flagPageEdit}>禁止补交</Radio>*/}
</div>
<div className="h20 mb10 "></div>
</div>
{/*评分设置*/}

Loading…
Cancel
Save