dev_forum
杨树林 6 years ago
parent 99dfd46d34
commit 3deae54e9a

@ -656,7 +656,7 @@ class PollNew extends Component {
"question_title": "",
"question_type": 1,
"new": "new",
"newid":Whether=== true? id :this.state.poll_questions[newarr.length - 1].question.id + 1,
"newid":Whether=== true? id :ids+ 1,
"answers": [
{"answer_id": 1, "answer_position": 1, "answer_text": ""},
{"answer_id": 2, "answer_position": 2, "answer_text": ""},
@ -691,7 +691,7 @@ class PollNew extends Component {
"max_choices": 0,
"min_choices": 0,
"new": "new",
"newid":Whether=== true? id :this.state.poll_questions[newarr.length - 1].question.id + 1,
"newid":Whether=== true? id :ids+1,
"answers": [
{"answer_id": 1, "answer_position": 1, "answer_text": ""},
{"answer_id": 2, "answer_position": 2, "answer_text": ""},
@ -724,7 +724,7 @@ class PollNew extends Component {
"question_title": "",
"question_type": 3,
"new": "new",
"newid":Whether=== true? id :this.state.poll_questions[newarr.length - 1].question.id + 1,
"newid":Whether=== true? id :ids + 1,
"answers": []
};
question = {"question": questiontwo};

@ -597,7 +597,6 @@ class Listofworks extends Component {
componentDidMount() {
console.log("Listofworks");
console.log("componentDidMount");
this.props.onRef(this)
var homeworkid = this.props.match.params.homeworkid;
// console.log(homeworkid)
// this.Gettitleinformation(homeworkid);

@ -18,9 +18,12 @@ import Workquestionandanswer from './Workquestionandanswer';
import CoursesListType from '../coursesPublic/CoursesListType';
import ShixunStudentWork from "./ShixunStudentWork";
import Startshixuntask from "../coursesPublic/Startshixuntask";
import TPMMDEditor from "../../tpm/challengesnew/TPMMDEditor";
class ShixunHomeworkPage extends Component {
constructor(props) {
super(props);
this.contentMdRef = React.createRef();
// this.answerMdRef = React.createRef();
this.state = {
tab: ["0"],
jobsettingsdata: undefined,
@ -84,15 +87,16 @@ class ShixunHomeworkPage extends Component {
console.log("84");
console.log(ref);
this.child = ref
}
homeworkendss(){
this.child.homeworkends();
this.contentMdRef.current.homeworkends();
}
homeworkstarts(){
this.child.homeworkstart();
this.contentMdRef.current.homeworkstart();
}
workshowmodels(){
this.child.workshowmodel();
this.contentMdRef.current.workshowmodel();
}
///////////////教师截止
@ -235,21 +239,21 @@ class ShixunHomeworkPage extends Component {
{
// 教师列表
parseInt(tab) === 0 ? (isAdmin === true ?
<Listofworks {...this.props} {...this.state} onRef={this.onRef}
<Listofworks {...this.props} {...this.state} ref={this.contentMdRef}
Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Listofworks>
:
<Listofworksstudentone {...this.props} {...this.state} onRef={this.onRef}
<Listofworksstudentone ref={this.contentMdRef} {...this.props} {...this.state} onRef={(ref)=>{ this.child = ref}}
Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Listofworksstudentone>)
:
parseInt(tab) === 1 ?
<Workquestionandanswer {...this.props} {...this.state} onRef={this.onRef}
<Workquestionandanswer ref={this.contentMdRef} {...this.props} {...this.state} onRef={(ref)=>{ this.child = ref}}
Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Workquestionandanswer>
:
parseInt(tab) === 2 ?
<ShixunStudentWork {...this.props} {...this.state} onRef={this.onRef}
<ShixunStudentWork ref={this.contentMdRef} {...this.props} {...this.state} onRef={(ref)=>{ this.child = ref}}
Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></ShixunStudentWork>
:
<Trainingjobsetting {...this.props} {...this.state} onRef={this.onRef}
<Trainingjobsetting ref={this.contentMdRef} {...this.props} {...this.state} onRef={(ref)=>{ this.child = ref}}
Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Trainingjobsetting>
}
</div>

Loading…
Cancel
Save