diff --git a/public/react/src/modules/courses/busyWork/CommonWorkList.js b/public/react/src/modules/courses/busyWork/CommonWorkList.js index 549dd6ae3..4c53a8362 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkList.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkList.js @@ -379,7 +379,7 @@ function buildColumns(that, student_works, studentData) { that.props.toWorkDetailPage2(e, courseId, workId, record.id)} // onClick={() => that.props.toWorkDetailPage(courseId, workId, record.id)} - >{isAdmin ? '评阅' : '查看'} + >{isAdmin ? record.has_comment===true?"已评阅":'评阅':"查看"} @@ -692,7 +692,7 @@ class CommonWorkList extends Component{ modulationModalVisible, work_statuses, id, user_name, user_login, student_id, group_name, work_status, update_time, teacher_score, teaching_asistant_score, student_score, - ultimate_score, work_score, student_comment_count, appeal_all_count, appeal_deal_count, + ultimate_score, work_score, student_comment_count, appeal_all_count, appeal_deal_count,has_comment, late_penalty, absence_penalty, appeal_penalty,user_comment_count , end_immediately, publish_immediately diff --git a/public/react/src/modules/courses/shixunHomework/Challenges.css b/public/react/src/modules/courses/shixunHomework/Challenges.css index 8ae2c002c..18100fcf3 100644 --- a/public/react/src/modules/courses/shixunHomework/Challenges.css +++ b/public/react/src/modules/courses/shixunHomework/Challenges.css @@ -26,4 +26,8 @@ overflow:hidden; text-overflow:ellipsis; white-space:nowrap +} + +.color32C090{ + color:#32C090 !important; } \ No newline at end of file diff --git a/public/react/src/modules/courses/shixunHomework/Chongzuomodel.js b/public/react/src/modules/courses/shixunHomework/Chongzuomodel.js new file mode 100644 index 000000000..e0bdc7378 --- /dev/null +++ b/public/react/src/modules/courses/shixunHomework/Chongzuomodel.js @@ -0,0 +1,68 @@ +import React from 'react'; +import Modals from "../../modals/Modals"; +import axios from 'axios'; +class Chongzuomodel extends React.Component { + + constructor(props) { + super(props); + this.state = { + ModalsType:false, + antIcon:false + } + } + + componentDidMount(){ + this.setState({ + ModalsType:this.props.Chongzuomodeltype, + Modalstopval:`该作业将被打回重做,学生实训记录将被清空!`, + ModalsBottomval:`确定打回?`, + }) + } + + ModalSaves=()=>{ + this.setState({ + antIcon:true + }) + let zrl=`/myshixuns/${this.props.chongzuoId}/reset_my_game.json`; + axios.get(zrl).then((response) => { + this.setState({ + antIcon:false + }) + this.props.showNotification("操作成功"); + this.props.hideChongzuomodeltype() + this.props.Isupdatass(); + }).catch((error) => { + this.setState({ + antIcon:false + }) + }); + } + + ModalCancels=()=>{ + this.props.hideChongzuomodeltype() + } + + render() { + //console.log(this.props) + // Chongzuomodeltype:undefined, + // chongzuoId:undefined, + return ( + + this.ModalSaves()} + modalCancel={()=>this.ModalCancels()} + loadtype={false} + antIcon={this.state.antIcon} + > + + + ); + } +} + +export default Chongzuomodel; + + diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index 6f489859e..6bf52c9ae 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -1,19 +1,10 @@ import React, {Component} from "react"; -import CoursesListType from '../coursesPublic/CoursesListType'; import {getRandomcode, publicSearchs, sortDirections} from 'educoder'; import { - Form, - Select, - Input, - Button, Checkbox, - Upload, Icon, - message, - Modal, Table, Pagination, - Radio, Tooltip, notification, Spin, @@ -30,18 +21,15 @@ import './Challenges.css'; import {getImageUrl} from 'educoder'; import TraineetraininginformationModal from "./TraineetraininginformationModal"; import DownloadMessageysl from '../../modals/DownloadMessageysl'; -import Startshixuntask from "../coursesPublic/Startshixuntask"; import ModulationModal from "../coursesPublic/ModulationModal"; import HomeworkModal from "../coursesPublic/HomeworkModal"; import OneSelfOrderModal from "../coursesPublic/OneSelfOrderModal"; import ShixunWorkModal from "./Shixunworkdetails/ShixunWorkModal"; import NoneData from '../../../modules/courses/coursesPublic/NoneData'; +import Chongzuomodel from "./Chongzuomodel"; -const Search = Input.Search; -const RadioGroup = Radio.Group; const CheckboxGroup = Checkbox.Group; -const {Option} = Select; -//GraduationTaskssetting.js + //作品列表(学生) let allow_lates=false; @@ -65,6 +53,8 @@ class Listofworksstudentone extends Component { //关卡得分final_score this.state = { + Chongzuomodeltype:undefined, + chongzuoId:undefined, searchtypes:false, jobsettingsdata: undefined, endTime: "2018/11/10 17:10:00", @@ -280,7 +270,11 @@ class Listofworksstudentone extends Component { width: '98px', render: (text, record) => ( - ( - ( - ( record.submitstate === "未开启" ? - this.Viewstudenttraininginformationtysl2(e, record)} - // onClick={() => this.Viewstudenttraininginformationt(record)} - >{record.has_comment===true?"已评阅":"评阅 "} : - this.Viewstudenttraininginformationtysl2(e, record)} - // onClick={() => this.Viewstudenttraininginformationt(record)} - >{record.has_comment===true?"已评阅":"评阅 "} - + + + {this.props.teacherdatapage === undefined ? "": this.props.teacherdatapage.homework_status[0]==="已截止"?"":record.myshixun_id===0?"":} + + : + + + + + {this.props.teacherdatapage === undefined ? "": this.props.teacherdatapage.homework_status[0]==="已截止"?"":record.myshixun_id===0?"":} + + ) }, ], @@ -1407,7 +1428,11 @@ class Listofworksstudentone extends Component { align: 'center', className: 'font-14', render: (text, record) => ( - ( record.submitstate === "未开启" ? - this.Viewstudenttraininginformationtysl2(e, record)} - // onClick={() => this.Viewstudenttraininginformationt(record)} - >{record.has_comment===true?"已评阅":"评阅"} : + + + + {this.props.teacherdatapage === undefined ? "": this.props.teacherdatapage.homework_status[0]==="已截止"?"":record.myshixun_id===0?"":} + + : - + this.Viewstudenttraininginformationtysl2(e, record)} // onClick={() => this.Viewstudenttraininginformationt(record)} >{record.has_comment===true?"已评阅":"评阅"} - + + {this.props.teacherdatapage === undefined ? "": this.props.teacherdatapage.homework_status[0]==="已截止"?"":record.myshixun_id===0?"":} + ) }, ], @@ -2072,7 +2115,7 @@ class Listofworksstudentone extends Component { classroom: teacherdata.group_name, cost_time: teacherdata.cost_time, has_comment:teacherdata.has_comment, - submitstate: teacherdata.work_status === 0 ? "未开启" : teacherdata.work_status === 1 ? "未通关" : teacherdata.work_status === 2 ? "按时通关" : "迟交通关", + submitstate:teacherdata.work_status === -1 ? "重做中":teacherdata.work_status === 0 ? "未开启" : teacherdata.work_status === 1 ? "未通关" : teacherdata.work_status === 2 ? "按时通关" : "迟交通关", // updatetime:this.state.teacherdata.student_works[i].update_time, // updatetime:"", updatetime: timedata === "Invalid date" ? "--" : timedata, @@ -2118,7 +2161,9 @@ class Listofworksstudentone extends Component { classroom: student_works[i].group_name, cost_time: student_works[i].cost_time, has_comment:student_works[i].has_comment, - submitstate: student_works[i].work_status === 0 ? "未开启" : student_works[i].work_status === 1 ? "未通关" : student_works[i].work_status === 2 ? "按时通关" : "迟交通关", + myshixun_id:student_works[i].myshixun_id, + myshixun_identifier:student_works[i].myshixun_identifier, + submitstate:student_works[i].work_status === -1 ? "重做中":student_works[i].work_status === 0 ? "未开启" : student_works[i].work_status === 1 ? "未通关" : student_works[i].work_status === 2 ? "按时通关" : "迟交通关", // updatetime:this.state.teacherdata.student_works[i].update_time, // updatetime:"", updatetime: timedata === "Invalid date" ? "--" : timedata, @@ -2280,7 +2325,7 @@ class Listofworksstudentone extends Component { classroom: teacherdata.group_name, cost_time: teacherdata.cost_time, has_comment:teacherdata.has_comment, - submitstate: teacherdata.work_status === 0 ? "未开启" : teacherdata.work_status === 1 ? "未通关" : teacherdata.work_status === 2 ? "按时通关" : "迟交通关", + submitstate:teacherdata.work_status === -1 ? "重做中":teacherdata.work_status === 0 ? "未开启" : teacherdata.work_status === 1 ? "未通关" : teacherdata.work_status === 2 ? "按时通关" : "迟交通关", // updatetime:this.state.teacherdata.student_works[i].update_time, // updatetime:"", updatetime: timedata === "Invalid date" ? "--" : timedata, @@ -2645,7 +2690,9 @@ class Listofworksstudentone extends Component { classroom: student_works[i].group_name, cost_time: student_works[i].cost_time, has_comment:student_works[i].has_comment, - submitstate: student_works[i].work_status === 0 ? "未开启" : student_works[i].work_status === 1 ? "未通关" : student_works[i].work_status === 2 ? "按时通关" : "迟交通关", + myshixun_id:student_works[i].myshixun_id, + myshixun_identifier:student_works[i].myshixun_identifier, + submitstate:student_works[i].work_status === -1 ? "重做中":student_works[i].work_status === 0 ? "未开启" : student_works[i].work_status === 1 ? "未通关" : student_works[i].work_status === 2 ? "按时通关" : "迟交通关", // updatetime:this.state.teacherdata.student_works[i].update_time, // updatetime:"", updatetime: timedata === "Invalid date" ? "--" : timedata, @@ -3441,6 +3488,19 @@ class Listofworksstudentone extends Component { }) } + chongzuofun=(id)=>{ + this.setState({ + chongzuoId:id, + Chongzuomodeltype:true + }) + } + + hideChongzuomodeltype=()=>{ + this.setState({ + chongzuoId:undefined, + Chongzuomodeltype:false + }) + } render() { let {columns,columnss, course_groupysls, datajs, isAdmin, homework_status, course_groupyslstwo, unlimited, unlimitedtwo, course_group_info, orders, task_status, checkedValuesine, searchtext, teacherlist, visible, visibles, game_list, columnsstu, columnsstu2, limit, experience, boolgalist, viewtrainingdata, teacherdata, page, data, jobsettingsdata, styletable, datas, order, loadingstate, computeTimetype} = this.state; @@ -3482,6 +3542,13 @@ class Listofworksstudentone extends Component { this.props.isAdmin() === true ?
+ {this.state.Chongzuomodeltype===true?this.hideChongzuomodeltype()} + Isupdatass={()=>this.Isupdatass()} + />:""} + {visible === true ? this.cancelModulationModel()} diff --git a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js index 454b11c6f..6534eea5e 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunWorkReport.js @@ -22,6 +22,7 @@ import "../common/formCommon.css"; import '../css/Courses.css'; import './style.css'; import 'moment/locale/zh-cn'; +import Chongzuomodel from "./Chongzuomodel"; class ShixunWorkReport extends Component { @@ -39,7 +40,12 @@ class ShixunWorkReport extends Component { work_comment:undefined, has_commit: false, shixun_detail:[], - view_tpi:false + view_tpi:false, + myshixun_id:undefined, + myshixun_identifier:undefined, + homework_end:undefined, + chongzuoId:undefined, + Chongzuomodeltype:false } } @@ -117,7 +123,10 @@ class ShixunWorkReport extends Component { spinning: false, has_commit: result.data.has_commit, shixun_detail:result.data.shixun_detail, - view_tpi:result.data.view_tpi + view_tpi:result.data.view_tpi, + myshixun_id:result.data.myshixun_id, + myshixun_identifier:result.data.myshixun_identifier, + homework_end:result.data.homework_end, }) } @@ -308,8 +317,22 @@ class ShixunWorkReport extends Component { } } + + Backtoredo=(id)=>{ + this.setState({ + chongzuoId:id, + Chongzuomodeltype:true + }) + } + + hideChongzuomodeltype=()=>{ + this.setState({ + chongzuoId:undefined, + Chongzuomodeltype:false + }) + } render() { - let {data, showAppraiseModaltype, work_comment_hidden, work_comment, has_commit,shixun_detail,view_tpi} = this.state; + let {data, showAppraiseModaltype, work_comment_hidden, work_comment, has_commit,shixun_detail,view_tpi,myshixun_id,myshixun_identifier,homework_end} = this.state; let category_id=data===undefined?"":data.category===null?"":data.category.category_id; let homework_common_id=data===undefined?"":data.homework_common_id; @@ -320,10 +343,17 @@ class ShixunWorkReport extends Component { // let showAppraiseModals=work_comment===null||work_comment===undefined?false:true; // console.log(this.props.isAdmin()) document.title=data&&data.course_name; - + return ( data===undefined?"": + {this.state.Chongzuomodeltype===true?this.hideChongzuomodeltype()} + Isupdatass={()=>this.getdatalist()} + />:""} + this.showAppraiseModal(1)}*/} {/*>评阅 : ""}*/} + + {this.props.isAdmin()?homework_end===false&&myshixun_id!=0?this.Backtoredo(myshixun_identifier)} + >打回重做:"":""} + {this.props.isAdmin() ?this.showAppraiseModal("main",undefined,work_comment,work_comment_hidden)}