diff --git a/public/react/src/modules/courses/coursesPublic/Startshixuntask.js b/public/react/src/modules/courses/coursesPublic/Startshixuntask.js index 9cf44c9a7..dfe56f945 100644 --- a/public/react/src/modules/courses/coursesPublic/Startshixuntask.js +++ b/public/react/src/modules/courses/coursesPublic/Startshixuntask.js @@ -46,7 +46,8 @@ class Startshixuntask extends Component{ }else{ if(response.data.status!=401&&response.data.status!=403){ - window.location.href = "/tasks/"+response.data.game_identifier; + const w=window.open('about:blank'); + w.location.href= "/tasks/"+response.data.game_identifier } } diff --git a/public/react/src/modules/courses/shixunHomework/Listofworks.js b/public/react/src/modules/courses/shixunHomework/Listofworks.js index 98ba43e55..23cb9c601 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworks.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworks.js @@ -93,6 +93,7 @@ class Listofworks extends Component { code_review: false, boolgalist:true, challenges_count:0, + experience:0, columns: [ { title: '序号', @@ -384,7 +385,7 @@ class Listofworks extends Component { // course_group:分班情况 [232, 231], []:不限(空数组) var data = { search: "", - order: "", + order: "desc", b_order: "asc", work_status: "", course_group: "", @@ -457,6 +458,11 @@ class Listofworks extends Component { task_status: result.data.task_status, course_group_info: result.data.course_group_info, loadingstate: false, + jobsettingsdata: result, + publish_immediately: result.data.publish_immediately, + work_efficiency: result.data.work_efficiency, + end_immediately: result.data.end_immediately, + code_review: result.data.code_review, challenges_count:result.data.challenges_count, }) @@ -1361,6 +1367,7 @@ class Listofworks extends Component { let datalist = []; var game_list = result.data.game_list var boolgalist=true; + var experience=0; for (var i = 0; i < game_list.length; i++) { datalist.push({ @@ -1370,6 +1377,7 @@ class Listofworks extends Component { classroom: game_list[i].score, complete_status: game_list[i].complete_status, }) + experience=game_list[i].complete_status+experience; if(game_list[i].complete_status === 2 || game_list[i].complete_status===3){ boolgalist=false; @@ -1383,6 +1391,7 @@ class Listofworks extends Component { viewtrainingdata: result.data, visibles: true, game_list: datalist, + experience:experience, boolgalist:boolgalist, }) } @@ -1588,7 +1597,7 @@ class Listofworks extends Component { render() { // console.log("Listofworks.js000") - let {columns, page, boolgalist,limit, course_groupysls, course_groupyslstwo, unlimited, unlimitedtwo, loadingstate, viewtrainingdata, game_list, data, course_group_info, order, teacherdata, task_status, checkedValuesine, searchtext, teacherlist, visible, visibles, jobsettingsdata} = this.state; + let {columns, page, boolgalist,limit, experience,course_groupysls, course_groupyslstwo, unlimited, unlimitedtwo, loadingstate, viewtrainingdata, game_list, data, course_group_info, order, teacherdata, task_status, checkedValuesine, searchtext, teacherlist, visible, visibles, jobsettingsdata} = this.state; // // console.log(teacherdata&&teacherdata.shixun_identifier) // console.log(course_group_info) @@ -1632,6 +1641,7 @@ class Listofworks extends Component { viewtrainingdata={viewtrainingdata} game_list={game_list} visible={visibles} + experience={experience} boolgalist={boolgalist} Cancel={() => this.cancelModulationModels()} /> diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index d5dbaf06d..716a6f442 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -90,7 +90,7 @@ class Listofworksstudentone extends Component { var data = { search: "", order: "", - b_order: "asc", + b_order: "desc", page: 1, limit: 20, work_status: "", @@ -107,6 +107,9 @@ class Listofworksstudentone extends Component { publish_immediately: result.data.publish_immediately, end_immediately: result.data.end_immediately, id: result.data.id, + work_efficiency: result.data.work_efficiency, + code_review: result.data.code_review, + challenges_count:result.data.challenges_count, }) if (result.data.student_works === undefined || result.data.student_works === null || JSON.stringify(result.data.student_works) === "[]") { this.seacthdata(); @@ -154,6 +157,13 @@ class Listofworksstudentone extends Component { task_status: result.data.task_status, course_group_info: result.data.course_group_info, student_works: result.data.student_works, + loadingstate: false, + jobsettingsdata: result, + publish_immediately: result.data.publish_immediately, + work_efficiency: result.data.work_efficiency, + end_immediately: result.data.end_immediately, + code_review: result.data.code_review, + challenges_count:result.data.challenges_count, }) if (result.data.student_works === undefined || result.data.student_works === null || JSON.stringify(result.data.student_works) === "[]") { this.seacthdata(); @@ -214,11 +224,15 @@ class Listofworksstudentone extends Component { // updatetime:this.state.teacherdata.student_works[i].update_time, // updatetime:"", updatetime: timedata === "Invalid date" ? "--" : timedata, - completion: this.state.teacherdata.complete_count === 4 ? "4/4" : this.state.teacherdata.complete_count === 3 ? "3/4" : this.state.teacherdata.complete_count === 2 ? "2/4" : this.state.teacherdata.complete_count === 1 ? "1/4" : this.state.teacherdata.complete_count === 0 ? "0" : 0, + completion: this.state.teacherdata.complete_count === null ? "0" :this.state.teacherdata.complete_count === undefined ? "0": this.state.teacherdata.complete_count, levelscore: this.state.teacherdata.final_score, efficiencyscore: this.state.teacherdata.eff_score, finalscore: this.state.teacherdata.work_score, operating: "查看", + late_penalty: this.state.teacherdata.late_penalty=== null?"0":this.state.teacherdata.student_works[i].late_penalty === undefined?"0":this.state.teacherdata.student_works[i].late_penalty, + ultimate_score:this.state.teacherdata.ultimate_score, + user_name: this.state.teacherdata.user_name, + user_login: this.state.teacherdata.user_login, }) // } @@ -253,11 +267,15 @@ class Listofworksstudentone extends Component { // updatetime:this.state.teacherdata.student_works[i].update_time, // updatetime:"", updatetime: timedata === "Invalid date" ? "--" : timedata, - completion: this.state.student_works[i].complete_count === 4 ? "4/4" : this.state.student_works[i].complete_count === 3 ? "3/4" : this.state.student_works[i].complete_count === 2 ? "2/4" : this.state.student_works[i].complete_count === 1 ? "1/4" : this.state.student_works[i].complete_count === 0 ? "0" : 0, + completion: this.state.teacherdata.student_works[i].complete_count === null ? "0" :this.state.teacherdata.student_works[i].complete_count === undefined ? "0": this.state.teacherdata.student_works[i].complete_count, levelscore: this.state.student_works[i].final_score, efficiencyscore: this.state.student_works[i].eff_score, finalscore: this.state.student_works[i].work_score, operating: "查看", + late_penalty: this.state.teacherdata.student_works[i].late_penalty=== null?"0":this.state.teacherdata.student_works[i].late_penalty === undefined?"0":this.state.teacherdata.student_works[i].late_penalty, + ultimate_score:this.state.teacherdata.student_works[i].ultimate_score, + user_name: this.state.teacherdata.student_works[i].user_name, + user_login: this.state.teacherdata.student_works[i].user_login, }) } @@ -310,11 +328,15 @@ class Listofworksstudentone extends Component { // updatetime:this.state.teacherdata.student_works[i].update_time, // updatetime:"", updatetime: timedata === "Invalid date" ? "--" : timedata, - completion: this.state.teacherdata.complete_count === 4 ? "4/4" : this.state.teacherdata.complete_count === 3 ? "3/4" : this.state.teacherdata.complete_count === 2 ? "2/4" : this.state.teacherdata.complete_count === 1 ? "1/4" : this.state.teacherdata.complete_count === 0 ? "0" : 0, + completion: this.state.teacherdata.complete_count === null ? "0" :this.state.teacherdata.complete_count === undefined ? "0": this.state.teacherdata.complete_count, levelscore: this.state.teacherdata.final_score, efficiencyscore: this.state.teacherdata.eff_score, finalscore: this.state.teacherdata.work_score, operating: "查看", + late_penalty: this.state.teacherdata.late_penalty=== null?"0":this.state.teacherdata.student_works[i].late_penalty === undefined?"0":this.state.teacherdata.student_works[i].late_penalty, + ultimate_score:this.state.teacherdata.ultimate_score, + user_name: this.state.teacherdata.user_name, + user_login: this.state.teacherdata.user_login, }) // } @@ -361,7 +383,8 @@ class Listofworksstudentone extends Component { // console.log(JSON.stringify(result)) let datalist = []; var game_list = result.data.game_list - + var boolgalist=true; + var experience=0; for (var i = 0; i < game_list.length; i++) { datalist.push({ @@ -371,7 +394,11 @@ class Listofworksstudentone extends Component { classroom: game_list[i].score, complete_status: game_list[i].complete_status, }) + experience=game_list[i].complete_status+experience; + if(game_list[i].complete_status === 2 || game_list[i].complete_status===3){ + boolgalist=false; + } } // console.log("viewtraining"); // console.log(datalist); @@ -379,7 +406,9 @@ class Listofworksstudentone extends Component { this.setState({ viewtrainingdata: result.data, visibles: true, - game_list: datalist + game_list: datalist, + experience:experience, + boolgalist:boolgalist, }) } }).catch((error) => { @@ -458,7 +487,13 @@ class Listofworksstudentone extends Component { task_status: result.data.task_status, course_group_info: result.data.course_group_info, student_works: result.data.student_works, - loadingstate: false + loadingstate: false, + jobsettingsdata: result, + publish_immediately: result.data.publish_immediately, + work_efficiency: result.data.work_efficiency, + end_immediately: result.data.end_immediately, + code_review: result.data.code_review, + challenges_count:result.data.challenges_count, }) this.seacthdata(); } @@ -495,7 +530,7 @@ class Listofworksstudentone extends Component { } render() { - let {visibles, game_list, limit, viewtrainingdata, teacherdata, page, data, jobsettingsdata, styletable, datas, order, loadingstate} = this.state; + let {visibles, game_list, limit,experience, boolgalist,viewtrainingdata, teacherdata, page, data, jobsettingsdata, styletable, datas, order, loadingstate} = this.state; let columns = [ { title: '序号', @@ -639,10 +674,7 @@ class Listofworksstudentone extends Component { align: "center", render: (text, record) => ( - {record.completion === undefined ? "--" : record.completion === "" ? "--" : record.completion} + {record.completion+"/"+this.state.challenges_count} ), }, @@ -719,6 +751,8 @@ class Listofworksstudentone extends Component { viewtrainingdata={viewtrainingdata} game_list={game_list} visible={visibles} + experience={experience} + boolgalist={boolgalist} Cancel={() => this.cancelModulationModels()} /> @@ -851,6 +885,8 @@ class Listofworksstudentone extends Component { viewtrainingdata={viewtrainingdata} game_list={game_list} visible={visibles} + experience={experience} + boolgalist={boolgalist} Cancel={() => this.cancelModulationModels()} /> : "" } @@ -925,7 +961,6 @@ class Listofworksstudentone extends Component { pagination={false} loading={false} showHeader={false} - scroll={{y: 240}} />} {JSON.stringify(datas) !== "[]" ? diff --git a/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js b/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js index 9f82abcfe..61b066580 100644 --- a/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js +++ b/public/react/src/modules/courses/shixunHomework/TraineetraininginformationModal.js @@ -37,6 +37,7 @@ class TraineetraininginformationModal extends Component { userids: this.props.userids, game_list:this.props.game_list, boolgalist:this.props.boolgalist, + experience:this.props.experience, }) // console.log("TraineetraininginformationModal") @@ -60,7 +61,7 @@ class TraineetraininginformationModal extends Component { } render() { var columns; - if(this.props.boolgalist === true) { + if(this.props.boolgalis&&this.props.boolgalist === true) { columns = [ { title: '关卡', @@ -195,7 +196,7 @@ class TraineetraininginformationModal extends Component {