|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
import React,{ Component } from "react";
|
|
|
|
|
import {QuillForEditor,markdownToHTML} from 'educoder';
|
|
|
|
|
import {MarkdownToHtml,QuillForEditor} from 'educoder';
|
|
|
|
|
import QestionDisplayHeader from './QestionDisplayHeader'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -14,8 +14,8 @@ class ShixunProgramming extends Component{
|
|
|
|
|
componentDidMount = () => {
|
|
|
|
|
}
|
|
|
|
|
render() {
|
|
|
|
|
let { question_title,
|
|
|
|
|
question_id, index, shixun_identifier
|
|
|
|
|
let { description,question_title,
|
|
|
|
|
question_id, index, shixun_identifier,hack_identifier
|
|
|
|
|
} = this.props;
|
|
|
|
|
const qNumber = `question_${index}`;
|
|
|
|
|
|
|
|
|
@ -36,24 +36,24 @@ class ShixunProgramming extends Component{
|
|
|
|
|
|
|
|
|
|
`}</style>
|
|
|
|
|
|
|
|
|
|
{/*<QestionDisplayHeader {...this.props} question_title={question_title}*/}
|
|
|
|
|
{/* topRight={*/}
|
|
|
|
|
{/* <a target="_blank" href={`/shixuns/${shixun_identifier}/challenges`} className="mr30"*/}
|
|
|
|
|
{/* style={{color: '#4CACFF'}}*/}
|
|
|
|
|
{/* >实训详情</a>*/}
|
|
|
|
|
{/* }*/}
|
|
|
|
|
{/*></QestionDisplayHeader>*/}
|
|
|
|
|
<QestionDisplayHeader {...this.props} question_title={question_title}
|
|
|
|
|
topRight={
|
|
|
|
|
<a target="_blank" href={`/myproblems/${hack_identifier}`} className="mr30"
|
|
|
|
|
style={{color: '#4CACFF'}}
|
|
|
|
|
>实训详情</a>
|
|
|
|
|
}
|
|
|
|
|
></QestionDisplayHeader>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{description&&
|
|
|
|
|
!this.props.exercise||this.props.exercise&&this.props.exercise.is_md?<MarkdownToHtml content={description} selector={'qtitle_' + (index + 1)} style={{ display: 'inline-block', width:'100%' , margin: '10px 0px 15px' }}
|
|
|
|
|
|
|
|
|
|
{/*{this.props.exercise&&this.props.exercise.is_md?<div className="mainQuestionDisplay color-grey-9 markdown-body"*/}
|
|
|
|
|
{/* dangerouslySetInnerHTML={{__html: markdownToHTML(question_title)}}*/}
|
|
|
|
|
{/*>*/}
|
|
|
|
|
{/*</div>:<QuillForEditor*/}
|
|
|
|
|
{/* readOnly={true}*/}
|
|
|
|
|
{/* style={{ float: 'left', display: 'inline-block' ,padding:'0px',margin: '2px 0px 0px'}}*/}
|
|
|
|
|
{/* value={question_title?JSON.parse(question_title):""}*/}
|
|
|
|
|
{/* // showUploadImage={this.handleShowUploadImage}*/}
|
|
|
|
|
{/*/>}*/}
|
|
|
|
|
></MarkdownToHtml>:<QuillForEditor
|
|
|
|
|
style={{ display: 'inline-block', width:'100%' , margin: '10px 0px 15px',padding:'0px'}}
|
|
|
|
|
readOnly={true}
|
|
|
|
|
value={description?JSON.parse(description):""}
|
|
|
|
|
// showUploadImage={this.handleShowUploadImage}
|
|
|
|
|
/>}
|
|
|
|
|
|
|
|
|
|
{/*{shixun.map((ch, index) => {*/}
|
|
|
|
|
{/* return <div>*/}
|
|
|
|
|