diff --git a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js index d0392fb74..1df901d97 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js @@ -4,8 +4,7 @@ import {WordsBtn, ActionBtn} from 'educoder'; import axios from 'axios'; import { notification, - Spin, - Tabs + Spin } from "antd"; import '../css/members.css'; import "../common/formCommon.css"; @@ -23,9 +22,6 @@ import Startshixuntask from "../coursesPublic/Startshixuntask"; import TPMMDEditor from "../../tpm/challengesnew/TPMMDEditor"; import DownloadMessageysl from "../../modals/DownloadMessageysl"; import Modals from "../../modals/Modals"; - -const { TabPane } = Tabs; - class ShixunHomeworkPage extends Component { constructor(props) { super(props); @@ -121,12 +117,12 @@ class ShixunHomeworkPage extends Component { /// 重做的确认 ModalSaves=()=>{ - this.setState({ - ModalsType:false, - Modalstopval:"" - }); + this.setState({ + ModalsType:false, + Modalstopval:"" + }); if(this.state.teacherdatapage){ - this.resetshixunCombat(this.state.teacherdatapage.myshixun_identifier); + this.resetshixunCombat(this.state.teacherdatapage.myshixun_identifier); } try { console.log("this.child"); @@ -153,29 +149,29 @@ class ShixunHomeworkPage extends Component { } //重置按钮 resetshixunCombat=(id)=>{ - this.setState({ - mylistisSpin:true, + this.setState({ + mylistisSpin:true, + }) + let zrl=`/myshixuns/${id}/reset_my_game.json`; + axios.get(zrl).then((response) => { + // window.location.href = "/shixuns/" + response.data.shixun_identifier + "/challenges"; + this.setState({ + mylistisSpin:false, + }) + this.child.Isupdatass(); + this.props.showNotification("已清空本实训的学习记录\n" + + "\n" + + "请点击“开启挑战”重做实训作业"); + }).catch((error) => { + this.setState({ + mylistisSpin:false, }) - let zrl=`/myshixuns/${id}/reset_my_game.json`; - axios.get(zrl).then((response) => { - // window.location.href = "/shixuns/" + response.data.shixun_identifier + "/challenges"; - this.setState({ - mylistisSpin:false, - }) - this.child.Isupdatass(); - this.props.showNotification("已清空本实训的学习记录\n" + - "\n" + - "请点击“开启挑战”重做实训作业"); - }).catch((error) => { - this.setState({ - mylistisSpin:false, - }) - console.log(error) - }); + console.log(error) + }); } bindRef = ref => { this.child = ref } ///////////////教师截止 - //编辑作业 + //编辑作业 Showupdateinstructionsboolfalse (bool) { this.setState({ Showupdateinstructions:bool @@ -187,105 +183,19 @@ class ShixunHomeworkPage extends Component { Showupdateinstructions:true }) } - gotohome=()=>{ + gotohome=()=>{ // console.log(this.props) let {jobsettingsdatapage}=this.state this.props.history.replace(`/courses/${this.props.match.params.coursesId}/${jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.category.main === 1 ? "shixun_homeworks" :"shixun_homework"}/${jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.category.category_id === undefined ? "" : jobsettingsdatapage.data.category.category_id}`); } - - - callback=(key)=>{ - this.setState({ - tab: key, - }) - } - render() { let {tab, teacherdatapage, jobsettingsdatapage} = this.state; const isAdmin = this.props.isAdmin(); // console.log(119) - // console.log(jobsettingsdatapage); + // console.log(jobsettingsdatapage); document.title=jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.course_name; - - const operations =
- {teacherdatapage === undefined ? "" : teacherdatapage.homework_name} -
-+ {teacherdatapage === undefined ? "" : teacherdatapage.homework_name} +
+