Merge branch 'dev_chen' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_chen

* 'dev_chen' of https://bdgit.educoder.net/Hjqreturn/educoder:
  调整
  调整
  调整
dev_chen
harry 5 years ago
commit 2f6532bb32

@ -125,7 +125,6 @@ class ExerciseDisplay extends Component{
{ exercise_questions.map((item, index) => { { exercise_questions.map((item, index) => {
if (item.question_type == 0 || item.question_type == 1) { if (item.question_type == 0 || item.question_type == 1) {
return <SingleDisplay {...this.props} {...item} index={index} {...commonHandler} {...this.state} return <SingleDisplay {...this.props} {...item} index={index} {...commonHandler} {...this.state}
displayCount={exercise_questions.length} showActionButton={false} key={index} displayCount={exercise_questions.length} showActionButton={false} key={index}
></SingleDisplay> ></SingleDisplay>
@ -146,7 +145,7 @@ class ExerciseDisplay extends Component{
} else if (item.question_type == 4) { } else if (item.question_type == 4) {
//
return <MainDisplay return <MainDisplay
showActionButton={false} key={index} {...this.state} showActionButton={false} key={index} {...this.state}
{...this.props} {...item} index={index} {...commonHandler} ></MainDisplay> {...this.props} {...item} index={index} {...commonHandler} ></MainDisplay>
@ -163,9 +162,10 @@ class ExerciseDisplay extends Component{
return <ShixunProgramming Testpapersettinghomepage return <ShixunProgramming Testpapersettinghomepage
showActionButton={false} key={index} {...this.state} showActionButton={false} key={index} {...this.state}
{...this.props} {...item} index={index} {...commonHandler} ></ShixunProgramming> {...this.props} {...item} index={index} {...commonHandler} ></ShixunProgramming>
}else{
return <div></div>
} }
return <div></div>
})} })}
</div> </div>
) )

@ -1,10 +1,9 @@
import React,{ Component } from "react"; import React,{ Component } from "react";
import {Radio} from 'antd'; import { Radio } from 'antd';
import {QuillForEditor, MarkdownToHtml } from 'educoder'; import { MarkdownToHtml } from 'educoder';
import QestionDisplayHeader from './QestionDisplayHeader' import QestionDisplayHeader from './QestionDisplayHeader'
class JudgeDisplay extends Component{ class JudgeDisplay extends Component{
constructor(props){ constructor(props){
super(props); super(props);
@ -33,12 +32,10 @@ class JudgeDisplay extends Component{
} }
render() { render() {
let { question_choices, let { question_choices,
question_id, index, question_id, index
} = this.props; } = this.props;
const qNumber = `question_${index}`; const qNumber = `question_${index}`;
// TODO show模式 isNew为false isEdit为false
return( return(
<div className="bor-bottom-greyE padding20-30" id={qNumber} _id={question_id}> <div className="bor-bottom-greyE padding20-30" id={qNumber} _id={question_id}>
@ -64,14 +61,9 @@ class JudgeDisplay extends Component{
<div key={optionIndex} className="fl mr30 df"> <div key={optionIndex} className="fl mr30 df">
<Radio disabled className="lineh-25" checked={item.standard_boolean}></Radio> <Radio disabled className="lineh-25" checked={item.standard_boolean}></Radio>
{this.props.exercise&&this.props.exercise.is_md?<MarkdownToHtml content={item.choice_text} selector={'judge_' + (index + 1) + optionIndex} <MarkdownToHtml content={item.choice_text} selector={'judge_' + (index + 1) + optionIndex}
className="" className=""
></MarkdownToHtml>:<QuillForEditor ></MarkdownToHtml>
readOnly={true}
style={{ float: 'left', display: 'inline-block' ,padding:'0px',margin: '2px 0px 0px'}}
value={item.choice_text?JSON.parse(item.choice_text):""}
// showUploadImage={this.handleShowUploadImage}
/>}
</div>) </div>)

@ -15,12 +15,11 @@ class ShixunProgramming extends Component{
} }
render() { render() {
let { question_title, let { question_title,
question_id, index, question_id, index, shixun_identifier
shixun_name, shixun_identifier
} = this.props; } = this.props;
const qNumber = `question_${index}`; const qNumber = `question_${index}`;
// TODO show模式 isNew为false isEdit为false
console.log(this.props) // console.log(this.props)
// console.log(this.state) // console.log(this.state)
// question_id: 32336 // question_id: 32336
// q_position: 4 // q_position: 4
@ -37,13 +36,13 @@ class ShixunProgramming extends Component{
`}</style> `}</style>
<QestionDisplayHeader {...this.props} question_title={question_title} {/*<QestionDisplayHeader {...this.props} question_title={question_title}*/}
topRight={ {/* topRight={*/}
<a target="_blank" href={`/shixuns/${shixun_identifier}/challenges`} className="mr30" {/* <a target="_blank" href={`/shixuns/${shixun_identifier}/challenges`} className="mr30"*/}
style={{color: '#4CACFF'}} {/* style={{color: '#4CACFF'}}*/}
>实训详情</a> {/* >实训详情</a>*/}
} {/* }*/}
></QestionDisplayHeader> {/*></QestionDisplayHeader>*/}
{/*{this.props.exercise&&this.props.exercise.is_md?<div className="mainQuestionDisplay color-grey-9 markdown-body"*/} {/*{this.props.exercise&&this.props.exercise.is_md?<div className="mainQuestionDisplay color-grey-9 markdown-body"*/}
@ -66,5 +65,4 @@ class ShixunProgramming extends Component{
) )
} }
} }
// RouteHOC() export default ShixunProgramming;
export default (ShixunProgramming);

Loading…
Cancel
Save