courseware
杨树明 5 years ago
parent 12757c31ef
commit 7789f2810f

@ -46,7 +46,7 @@ debugType="admin";
// 老师
// debugType="teacher";
// 学生
// debugType="student";
//debugType="student";

@ -44,13 +44,13 @@ class fillEmpty extends Component{
}
onOptionContentChange = (value, index) => {
let array = this.state.array.slice(0);
let array = this.state.array.slice(0);
array[index].value = value;
this.setState({ array })
}
onBlurEmpty=(index,number)=>{
let array = this.state.array.slice(0);
let array = this.state.array.slice(0);
let v=array[index].value;
let question_id=this.props.questionType.question_id;
let url=`/exercise_questions/${question_id}/exercise_answers.json`
@ -73,8 +73,8 @@ class fillEmpty extends Component{
}
render(){
let {
questionType ,
let {
questionType ,
exercise ,
user_exercise_status,
}=this.props
@ -89,11 +89,11 @@ class fillEmpty extends Component{
.emptyPanel div#content_editorMd_show{
width: 100%;
border-radius: 4px;
height: 35px;
// height: 35px;
margin-top:0px;
background-color:#fafafa;
color:#999;
line-height:25px;
// line-height:25px;
}
.answerStyle{
background:#f5f5f5;
@ -111,10 +111,18 @@ class fillEmpty extends Component{
<span className="mr10 lineh-35 font-16">答案填空{key+1}:</span>
<div className="flex1" style={{width:"0"}}>
{
user_exercise_status == 1 ?
<input value={item.value} className="input-100-35" style={{backgroundColor: "#F5F5F5",cursor:"default"}} placeholder={ isStudent && item.value ? `请输入填空${key+1}的答案` : "" } readOnly/>
user_exercise_status == 1 ?
// <input value={item.value} className="input-100-35" style={{backgroundColor: "#F5F5F5",cursor:"default"}} placeholder={ isStudent && item.value ? `请输入填空${key+1}的答案` : "" } readOnly/>
<div id="content_editorMd_show" className="new_li content_editorMd_show markdown-body"
// style={_style}
style={{backgroundColor: "#F5F5F5",cursor:"default"}}
dangerouslySetInnerHTML={{__html: markdownToHTML(item.value)}}
// onClick={this.toMDMode}
>
</div>
:
<DMDEditor
<DMDEditor
ref={`md${questionType.q_position}${key}`}
toMDMode={this.toMDMode} toShowMode={this.toShowMode}
height={150} className={'optionMdEditor'} watch={false} noStorage={true}
@ -129,7 +137,7 @@ class fillEmpty extends Component{
}
{
// 答案公开,且试卷已经截止
questionType.standard_answer &&
questionType.standard_answer &&
<div>
<p className="bor-top-greyE pt20 mt20 font-16 mb10">参考答案</p>
{ questionType.standard_answer && questionType.standard_answer.map((item,k)=>{
@ -141,7 +149,7 @@ class fillEmpty extends Component{
item.answer_text && item.answer_text.map((i,index)=>{
return(
<MarkdownToHtml content={i} selector={'empty_' + (this.props.index + 1) +(k + 1) + (index + 1)}
className="standardAnswer answerStyle mb10"
className="standardAnswer answerStyle mb10"
></MarkdownToHtml>
// <div className="standardAnswer markdown-body answerStyle mb10" dangerouslySetInnerHTML={{__html: markdownToHTML1(i)}}></div>
)
@ -154,7 +162,7 @@ class fillEmpty extends Component{
}
</div>
}
</div>
)
}

Loading…
Cancel
Save