diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index 5fd2abdee..030e2cde7 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -157,9 +157,9 @@ class Trainingjobsetting extends Component { this.props.triggerRef(this); - // if (this.props.isAdmin() === false) { - // this.cancelEdit() - // } + if (this.props.isAdmin() === false) { + this.cancelEdit() + } } // componentWillReceiveProps(nextProps) { @@ -302,7 +302,7 @@ class Trainingjobsetting extends Component { work_efficiencys: result.data.work_efficiency, latedeductiontwo: result.data.eff_score, proportion: result.data.shixun_evaluation === 0 ? "均分比例" : result.data.shixun_evaluation === 1 ? "经验值比例" : result.data.shixun_evaluation === 2 ? "自定义分值" : "", - publicwork: result.data.work_public, + publicwork: result.data.score_open, challenge_settings: result.data.challenge_settings, code_review: result.data.code_review, total_scoretwo:result.data.total_score, @@ -676,6 +676,7 @@ class Trainingjobsetting extends Component { // this.props.showNotification(`总分值+效率效率分之和要等于100,现在分值为` + max); // return; // } + if (this.state.proportion === "自定义分值") { try { if(parseFloat(this.state.CalculateMax)!==parseFloat(max)){ @@ -722,8 +723,8 @@ class Trainingjobsetting extends Component { 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, //扣分项 - work_efficiency: this.state.completionefficiencyscore, //完成效率评分占比 - eff_score: this.state.completionefficiencyscore === true ? this.state.latedeductiontwo : undefined,//效率分 + work_efficiency: this.state.work_efficiencys, //完成效率评分占比 + eff_score: this.state.work_efficiencys === true ? this.state.latedeductiontwo : undefined,//效率分 shixun_evaluation: this.state.proportion === "均分比例" ? 0 : this.state.proportion === "经验值比例" ? 1 : this.state.proportion === "自定义分值" ? 2 : 0, challenge_settings: array, score_open: this.state.publicwork, @@ -756,7 +757,7 @@ class Trainingjobsetting extends Component { late_time: moment(this.state.late_time).format('YYYY-MM-DD HH:mm'), //结束时间 answer_open_evaluation: this.state.level === "满分" ? true : false, //扣分项 work_efficiency: this.state.work_efficiencys, //完成效率评分占比 - eff_score: this.state.completionefficiencyscore === true ? this.state.latedeductiontwo : undefined,//效率分 + eff_score: this.state.work_efficiencys=== true ? this.state.latedeductiontwo : undefined,//效率分 shixun_evaluation: this.state.proportion === "均分比例" ? 0 : this.state.proportion === "经验值比例" ? 1 : this.state.proportion === "自定义分值" ? 2 : 0, challenge_settings: array, score_open: this.state.publicwork,