diff --git a/public/react/src/modules/courses/shixunHomework/Listofworks.js b/public/react/src/modules/courses/shixunHomework/Listofworks.js
index de4679256..1a721f8b3 100644
--- a/public/react/src/modules/courses/shixunHomework/Listofworks.js
+++ b/public/react/src/modules/courses/shixunHomework/Listofworks.js
@@ -597,7 +597,7 @@ class Listofworks extends Component {
componentDidMount() {
console.log("Listofworks");
console.log("componentDidMount");
- this.props.onRef(this);
+ this.props.triggerRef(this)
var homeworkid = this.props.match.params.homeworkid;
// console.log(homeworkid)
// this.Gettitleinformation(homeworkid);
diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js
index 8192e6a17..6d2f5c9c9 100644
--- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js
+++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js
@@ -317,6 +317,7 @@ class Listofworksstudentone extends Component {
componentDidMount() {
console.log("Listofworksstudentone");
console.log("componentDidMount");
+ this.props.triggerRef(this);
var homeworkid = this.props.match.params.homeworkid;
this.Getalistofworks(homeworkid);
let query = this.props.location.pathname;
diff --git a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js
index 242e99db1..baf1d6232 100644
--- a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js
+++ b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js
@@ -81,8 +81,8 @@ class ShixunHomeworkPage extends Component {
}
- confirmysl(url) {
- this.refs.DownloadMessage.confirmysl(url);
+ confirmysl(child,url) {
+ child.confirmysl(url);
}
onRef = (ref) => {
@@ -91,33 +91,40 @@ class ShixunHomeworkPage extends Component {
this.state.child= ref
}
- homeworkendss(){
- // console.log(this.contentMdRef.current);
+ homeworkendss(child){
+ // console.log(child);
// // console.log(this.refs.childModel);
- // console.log(this.state.child);
-
- // .homeworkends();
+ // console.log(child);
+ child.homeworkends();
+ //
}
- homeworkstarts(){
+ homeworkstarts(child){
// console.log(this.contentMdRef.current);
// console.log(this.state.child);
+ child.homeworkstart();
+
// .homeworkstart();
}
- workshowmodels(){
+ workshowmodels(child){
// console.log(this.contentMdRef.current)
// console.log(this.state.child);
+ // console.log(this.child);
+ child.workshowmodel();
// .workshowmodel();
}
+ bindRef = ref => { this.child = ref }
///////////////教师截止
render() {
let {tab, teacherdata, jobsettingsdata} = this.state;
const isAdmin = this.props.isAdmin();
+ // console.log("126");
+ // console.log(this.child);/
return (
@@ -208,27 +215,27 @@ class ShixunHomeworkPage extends Component {
导出
: ""}
{this.props.isAdmin() ?
teacherdata && teacherdata.end_immediately === true ?
-
立即截止
+
this.homeworkendss(this.child)}>立即截止
: ""
: ""}
{this.props.isAdmin() ?
teacherdata && teacherdata.publish_immediately === true ?
-
立即发布
+
this.homeworkstarts(this.child)}>立即发布
: ""
: ""}
{this.props.isAdmin() ?
teacherdata && teacherdata.code_review === true ?
-
代码查重
+
this.workshowmodels(this.child)}>代码查重
: "" : ""}
{this.state.view_report === true ?
@@ -252,21 +259,21 @@ class ShixunHomeworkPage extends Component {
{
// 教师列表
parseInt(tab) === 0 ? (isAdmin === true ?
-
this.Getdataback(jobsettingsdata, teacherdata)}>
:
-
{ this.child = ref}}
+ this.Getdataback(jobsettingsdata, teacherdata)}>)
:
parseInt(tab) === 1 ?
- { this.child = ref}}
+ this.Getdataback(jobsettingsdata, teacherdata)}>
:
parseInt(tab) === 2 ?
- { this.child = ref}}
+ this.Getdataback(jobsettingsdata, teacherdata)}>
:
- { this.child = ref}}
+ this.Getdataback(jobsettingsdata, teacherdata)}>
}
diff --git a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js
index 17e51258f..37ea4d1c3 100644
--- a/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js
+++ b/public/react/src/modules/courses/shixunHomework/ShixunStudentWork.js
@@ -76,6 +76,7 @@ class ShixunStudentWork extends Component {
componentDidMount() {
console.log("ShixunStudentWork");
console.log("componentDidMount");
+ this.props.triggerRef(this);
this.getupdata();
this.getTrainingjobsetting();
}
diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js
index ae1058d8a..411855491 100644
--- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js
+++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js
@@ -128,6 +128,7 @@ class Trainingjobsetting extends Component {
componentDidMount() {
console.log("Trainingjobsetting");
console.log("componentDidMount");
+ this.props.triggerRef(this);
this.getTrainingjobsetting();
let query = this.props.location.pathname;
const type = query.split('/');
diff --git a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js
index 52a214b7e..39a963023 100644
--- a/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js
+++ b/public/react/src/modules/courses/shixunHomework/Workquestionandanswer.js
@@ -84,6 +84,7 @@ class Workquestionandanswer extends Component {
componentDidMount() {
console.log("Workquestionandanswer");
console.log("componentDidMount");
+ this.props.triggerRef(this);
var homeworkid = this.props.match.params.homeworkid;
// console.log(homeworkid)
this.Gettitleinformation(homeworkid)