diff --git a/2 b/2 new file mode 100644 index 000000000..e69de29bb diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index db58e95fd..81e388d6f 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -1482,6 +1482,7 @@ class Listofworksstudentone extends Component { } //计算成绩 setComputeTime=()=>{ + let matchurl = this.props.match.url; let {teacherdata}=this.state; this.setState({ computeTimetype:false @@ -1494,6 +1495,7 @@ class Listofworksstudentone extends Component { this.props.showNotification(`${response.data.message}`); // var homeworkid = this.props.match.params.homeworkid; this.Getalistofworks(homeworkid); + this.props.history.replace( matchurl ); // this.Getalistofworkstwo("", "", "", "", 1, 20); }).catch((error) => { console.log(error) @@ -2147,6 +2149,9 @@ class Listofworksstudentone extends Component { } setComputeTimet=()=>{ + + let matchurl = this.props.match.url; + this.setState({ computeTimetype:false }) @@ -2163,6 +2168,7 @@ class Listofworksstudentone extends Component { }) this.Startsortingt(this.state.orders, this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit); this.props.showNotification(`${response.data.message}`); + this.props.history.replace( matchurl ); } }).catch((error) => { console.log(error) diff --git a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js index e2285a7a6..fec98e69b 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js @@ -123,9 +123,9 @@ class ShixunHomeworkPage extends Component { let {tab, teacherdatapage, jobsettingsdatapage} = this.state; const isAdmin = this.props.isAdmin(); - console.log(119) - console.log(jobsettingsdatapage); - console.log(teacherdatapage); + // console.log(119) + // console.log(jobsettingsdatapage); + // console.log(teacherdatapage); return (
{item.stage_description}
diff --git a/public/react/src/modules/paths/PathDetail/DetailTop.js b/public/react/src/modules/paths/PathDetail/DetailTop.js index 50c5c2680..09425df92 100644 --- a/public/react/src/modules/paths/PathDetail/DetailTop.js +++ b/public/react/src/modules/paths/PathDetail/DetailTop.js @@ -1,238 +1,241 @@ -import React,{ Component } from "react"; -import { Modal,Radio,Input,Tooltip } from "antd"; -import { BrowserRouter as Router, Route, Link } from "react-router-dom"; -import SendPanel from "./sendPanel.js"; -import { getImageUrl } from 'educoder'; -import axios from 'axios'; -import Modals from '../../modals/Modals'; -import './DetailTop.css'; - -const Search = Input.Search; -const RadioGroup = Radio.Group; -class DetailTop extends Component{ - constructor(props){ - super(props) - this.state={ - cardsModalcancel:this.cardsModalcancel, - cardsModalsave:this.cardsModalsave, - Modalstype:false, - Modalstopval:"", - Modalsbottomval:'', - loadtype:false, - deletepathtype:false, - cardsModalsavetype:false - } - } - - allow_deletepath=()=>{ - this.setState({ - Modalstype:true, - Modalstopval:"是否删除路径?", - deletepathtype:true - }) - } - - applyissuePath=()=>{ - this.setState({ - Modalstype:true, - Modalstopval:"发布申请已提交,请等待管理员的审核", - Modalsbottomval:"• 我们将在1-2个工作日内完成审核", - loadtype:true - }) - } - - cancelissuePath=()=>{ - let pathId=this.props.match.params.pathId; - let url ="/paths/"+pathId+"/cancel_publish.json"; - axios.get(url).then((result)=>{ - if(result.status===200){ - if(result.data.status===0){ - - }else if(result.data.status===1){ - window.location.href = "/paths/" + result.data.subject_id - } - } - }).catch((error)=>{ - console.log(error); - }) - } - - reovkissuePath=()=>{ - - this.setState({ - Modalstype:true, - Modalstopval:"是否确认撤销发布", - Modalsbottomval:"确认后,回退到编辑状态", - cardsModalsavetype:true, - }) - - } - reovkissuePaths=()=>{ - let pathId=this.props.match.params.pathId; - let url ="/paths/"+pathId+"/cancel_has_publish.json"; - axios.get(url).then((result)=>{ - if(result.status===200){ - if(result.data.status===0){ - - }else if(result.data.status===1){ - this.setState({ - cardsModalsavetype:false, - loadtype:false, - deletepathtype:false - }) - window.location.href = "/paths/" + result.data.subject_id - } - } - }).catch((error)=>{ - console.log(error); - }) - } - - cardsModalcancel=()=>{ - this.setState({ - Modalstype:false, - Modalsbottomval:'', - loadtype:false, - deletepathtype:false - }) - } - - cardsModalsave=()=>{ - let {loadtype,deletepathtype}=this.state; - - //删除路径 - if(deletepathtype===true){ - let pathid=this.props.match.params.pathId; - const deleteUrl = `/paths/`+pathid+`.json`; - axios.delete(deleteUrl).then((response) => { - const status = response.data.status - if (status === 1) { - window.location.href = "/paths"; - } - }).catch((error) => { - console.log(error) - }) - } - - //申请发布 - if(loadtype===true){ - - let pathid=this.props.match.params.pathId; - let url ="/paths/"+pathid+"/publish.json"; - axios.get(url).then((result)=>{ - if(result.status===200){ - if(result.data.status===0){ - this.setState({ - Modalstype:true, - Modalstopval: result.data.message, - }) - }else if(result.data.status===1){ - window.location.reload(); - } - } - }).catch((error)=>{ - console.log(error); - }) - - } - this.setState({ - Modalstype:false, - Modalsbottomval:'' - }) - } - - render(){ - let{detailInfoList}=this.props; - let{Modalstype,Modalstopval,cardsModalcancel,cardsModalsave,Modalsbottomval,cardsModalsavetype,loadtype}=this.state; - const radioStyle = { - display: 'block', - height: '30px', - lineHeight: '30px', - }; - - return( -
课程须知
{detailInfoList===undefined?"":detailInfoList.allow_statistics===true?
+
简介
+
-
+