diff --git a/public/react/src/common/components/markdown/DMDEditor.js b/public/react/src/common/components/markdown/DMDEditor.js
index b9435176f..7091adf00 100644
--- a/public/react/src/common/components/markdown/DMDEditor.js
+++ b/public/react/src/common/components/markdown/DMDEditor.js
@@ -1,83 +1,83 @@
-import React,{ Component } from "react";
-import TPMMDEditor from '../../../modules/tpm/challengesnew/TPMMDEditor'
-import {markdownToHTML} from 'educoder'
-import './DMDEditor.css'
-// 需要父组件通过toShowMode、toMDMode 来控制,一次只能打开一个DMDEditor
-class DMDEditor extends Component{
- constructor(props){
- super(props);
- this.mdRef = React.createRef()
- this.state={
- mdMode: false,
- // value: this.props.initValue
- }
- }
- componentDidUpdate(prevProps, prevState) {
-
- }
- componentDidMount() {
- // if(this.props.initValue != this.mdRef.current.getValue()) {
- // this.mdRef.current.setValue(this.props.initValue)
- // }
- }
-
-
- toMDMode = () => {
- this.setState({mdMode: true}, () => {
- this.mdRef.current.resize()
- this.mdRef.current.setValue(this.props.initValue)
- })
- this.props.toMDMode(this)
- }
- toShowMode = () => {
- this.setState({mdMode: false})
- this.props.toShowMode && this.props.toShowMode(this)
- }
- onCMBlur = () => {
- this.toShowMode()
- }
- onChange = (val) => {
- // this.setState({ value: val })
- this.props.onChange(val)
- if (this.state.showError == true) {
- this.setState({showError: false})
- }
- }
- showError = () => {
- this.mdRef.current.showError()
- this.setState({showError: true})
- }
- render(){
- const { mdMode, showError } = this.state;
- const { initValue } = this.props;
- let _style = {}
- if (showError) {
- _style.border = '1px solid red'
- }
- _style = Object.assign(_style, {display: mdMode == true ? 'none' : '', color: initValue? '': '#999', alignItems: 'center', wordBreak: 'break-all'})
- return(
-
- - - - - {item.name} - - - {item.response===undefined?"":bytesToSize(item.size)} - - this.onAttachmentRemove(item.response===undefined?"":item.response.id&&item.response.id)}> -
- ) - })} + {/**/} + {/*{this.state.fileList.length===0?"":this.state.fileList.map((item,key)=>{*/} + {/*return(*/} + {/**/} + {/**/} + {/**/} + {/**/} + {/**/} + {/*{item.name}*/} + {/**/} + {/**/} + {/*{item.response===undefined?"":bytesToSize(item.size)}*/} + {/**/} + {/*this.onAttachmentRemove(item.response===undefined?"":item.response.id&&item.response.id)}>*/} + {/*
*/} + {/*)*/} + {/*})}*/} @@ -675,7 +691,7 @@ class GraduationTasksSubmitedit extends Component{ >- - - - - {item.name} - - - {item.response===undefined?"":bytesToSize(item.size)} - - this.onAttachmentRemove(item.response===undefined?"":item.response.id&&item.response.id)}> -
- ) - })} + {/**/} + {/*{this.state.fileList.length===0?"":this.state.fileList.map((item,key)=>{*/} + {/*return(*/} + {/**/} + {/**/} + {/**/} + {/**/} + {/**/} + {/*{item.name}*/} + {/**/} + {/**/} + {/*{item.response===undefined?"":bytesToSize(item.size)}*/} + {/**/} + {/*this.onAttachmentRemove(item.response===undefined?"":item.response.id&&item.response.id)}>*/} + {/*
*/} + {/*)*/} + {/*})}*/} @@ -638,7 +652,7 @@ render(){ >
第{index + 1}题:
this.addMytopic(item.question.question_type, this.state.pollid, index + 1, true, item.question.id)}>
- 其它
-
-
- {this.state.polls_status === undefined || this.state.polls_status === 1 ?
- this.Deleteentrys(arrid, indext, true)}>
- 选项
-
- {this.state.polls_status === undefined || this.state.polls_status === 1 ?
- this.Deleteentrys(arrid, indext, false)}>
其它
+ {itemo.question.answers === undefined ? "" : itemo.question.answers.map((itemt, indext) => { + return ( +
其它
-
- {this.state.polls_status === undefined || this.state.polls_status === 1 ?
- this.Deleteentrys(arrid, indext, true)}>
+
+ {this.state.polls_status === undefined || this.state.polls_status === 1 ?
+ this.Deleteentrys(arrid, indext, true)}>
选项
-
- {this.state.polls_status === undefined || this.state.polls_status === 1 ?
- this.Deleteentrys(arrid, indext, false)}>
+ 其它
+
+
+ {polls_status === undefined || polls_status === 1 ?
+ this.Deleteentrys(arrid, indext, true)}>
+ 选项
+
+
+ {polls_status === undefined || polls_status === 1 ?
+ this.Deleteentrys(arrid, indext, false)}>