import React,{ Component } from "react"; import {QuillForEditor,MarkdownToHtml} from 'educoder'; import QestionDisplayHeader from './QestionDisplayHeader' class NullDisplay extends Component{ constructor(props){ super(props); this.state = { question_choices: ['', '', '', ''], standard_answers: [false, false, false, false] } } componentDidMount = () => { const Id = this.props.match.params.Id this.isEdit = !!Id if (Id) { const url = `/exercises/${Id}/edit.json` // axios.get(url) // .then((response) => { // if (response.data.status == 0) { // } // }) // .catch(function (error) { // console.log(error); // }); } } render() { let { question_type, standard_answer, question_id,index, } = this.props; const qNumber = `question_${index}`; /** is_ordered: true multi_count: 3 question_id: 10444 question_number: 6 question_score: 2 question_title: "_2323_↵↵_" question_type: 3 standard_answer: [{choice_id: 1, answer_text: ["2", "22"]}] */ return(
{ standard_answer.map((answers, _index) => { return
答案(填空{_index+1}):
{ answers.answer_text.map((item, itemIndex) => { return( !this.props.exercise||this.props.exercise&&this.props.exercise.is_md?: ) })}
}) }
) } } // RouteHOC() export default (NullDisplay);