dev_chen^2
杨树明 5 years ago
parent ed136d751d
commit 76169039c1

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

@ -617,6 +617,23 @@ class ExerciseReviewAndAnswer extends Component{
} }
} }
ProgrammingDetails=(item)=>{
if(item.hack_identifier){
let url= `/problems/${item.hack_identifier}/start.json`;
var newOpenWindow=window.open('about:blank'); // 在ajax外部先打开空白新窗口
axios.get(url).then((result)=>{
if(result.data.status===0){
newOpenWindow.location=`/myproblems/${result.data.identifier}`;
}
}).catch((error)=>{
console.log(error);
})
}
}
render(){ render(){
let coursesId=this.props.match.params.coursesId; let coursesId=this.props.match.params.coursesId;
let eId=this.props.match.params.Id; let eId=this.props.match.params.Id;
@ -692,7 +709,8 @@ class ExerciseReviewAndAnswer extends Component{
width:100%!important width:100%!important
} }
.ql-editor{ .ql-editor{
padding:0px !important padding:0px !important;
overflow: unset !important;
} }
`}</style> `}</style>
{url? {url?
@ -917,7 +935,12 @@ class ExerciseReviewAndAnswer extends Component{
{ {
//实训题 ,答题 //实训题 ,答题
item.question_type == 5 && item.question_type == 5 &&
<a href={"/shixuns/"+item.shixun_identifier+"/challenges"} target="_blank" class="font-16 color-blue fl" target={"_blank"}>实训详情</a> <a href={"/shixuns/"+item.shixun_identifier+"/challenges"} target="_blank" class="font-16 color-blue fl">实训详情</a>
}
{
//实训题 ,答题
item.question_type == 6 &&
<a onClick={()=>this.ProgrammingDetails(item)} class="font-16 color-blue fl">进入答题</a>
} }
</span> </span>
</p> </p>

@ -288,6 +288,7 @@ class Exercisestatisticalresult extends Component {
} }
.ql-editor{ .ql-editor{
padding:0px !important; padding:0px !important;
overflow: unset !important;
} }
`} `}
</style> </style>
@ -302,7 +303,7 @@ class Exercisestatisticalresult extends Component {
{/*Q{item.ques_position}*/} {/*Q{item.ques_position}*/}
{/* <div className={"markdown-body"} dangerouslySetInnerHTML={{__html: markdownToHTML1(item.ques_title).replace(/▁/g,"▁▁▁")}}></div> */} {/* <div className={"markdown-body"} dangerouslySetInnerHTML={{__html: markdownToHTML1(item.ques_title).replace(/▁/g,"▁▁▁")}}></div> */}
{this.state&&this.state.data.is_md===false&&item.ques_type!=6?<QuillForEditor {this.state&&this.state.data.is_md===false&&item.ques_type!=6?<QuillForEditor
style={{ display: 'inline-block', width:'100%' , margin: '1px',padding:'0px'}} style={{ display: 'inline-block', width:'100%' , margin: '1px',padding:'0px',overflow: 'unset !important'}}
readOnly={true} readOnly={true}
value={item.ques_title?JSON.parse(item.ques_title):""} value={item.ques_title?JSON.parse(item.ques_title):""}
// showUploadImage={this.handleShowUploadImage} // showUploadImage={this.handleShowUploadImage}

@ -67,7 +67,7 @@ class Exercisetablesmubus extends Component {
const _content = <span style={{color:text.type===true? "#29BD8B":'#333333', width: '100%'}}> const _content = <span style={{color:text.type===true? "#29BD8B":'#333333', width: '100%'}}>
{text.value>0&&text.value!="有效填写量"&&text.value!="wrong"||!text.value&&text.value!="有效填写量"&&text.value!="wrong"?text.value:text.value!="有效填写量"&&text.value!="wrong" && {text.value>0&&text.value!="有效填写量"&&text.value!="wrong"||!text.value&&text.value!="有效填写量"&&text.value!="wrong"?text.value:text.value!="有效填写量"&&text.value!="wrong" &&
this.props&&this.props.data.is_md===false?<QuillForEditor this.props&&this.props.data.is_md===false?<QuillForEditor
style={{ display: 'inline-block', width:'100%' , margin: '1px',padding:'0px'}} style={{ display: 'inline-block', width:'100%' , margin: '1px',padding:'0px',overflow: 'unset !important'}}
readOnly={true} readOnly={true}
value={this.setdata(text.value)} value={this.setdata(text.value)}
// showUploadImage={this.handleShowUploadImage} // showUploadImage={this.handleShowUploadImage}
@ -141,6 +141,7 @@ class Exercisetablesmubus extends Component {
} }
.ql-editor{ .ql-editor{
padding:0px !important; padding:0px !important;
overflow: unset !important;
} }
`} `}
</style> </style>

@ -77,7 +77,7 @@ class JudgeDisplay extends Component{
className="" className=""
></MarkdownToHtml>:<QuillForEditor ></MarkdownToHtml>:<QuillForEditor
readOnly={true} readOnly={true}
style={{ float: 'left', display: 'inline-block' ,padding:'0px',margin: '2px 0px 0px'}} style={{ float: 'left', display: 'inline-block' ,padding:'0px',margin: '2px 0px 0px',overflow: 'unset !important'}}
value={this.setdata(item.choice_text)} value={this.setdata(item.choice_text)}
// showUploadImage={this.handleShowUploadImage} // showUploadImage={this.handleShowUploadImage}
/>} />}

@ -61,7 +61,7 @@ class MainDisplay extends Component{
className="" className=""
></MarkdownToHtml>:<QuillForEditor ></MarkdownToHtml>:<QuillForEditor
readOnly={true} readOnly={true}
style={{ float: 'left', display: 'inline-block' ,padding:'0px',margin: '2px 0px 0px'}} style={{ float: 'left', display: 'inline-block' ,padding:'0px',margin: '2px 0px 0px',overflow: 'unset !important'}}
value={this.setdata(standard_answer[0])} value={this.setdata(standard_answer[0])}
// showUploadImage={this.handleShowUploadImage} // showUploadImage={this.handleShowUploadImage}
/>} />}

@ -99,7 +99,7 @@ class NullDisplay extends Component{
content={item} selector={'null_' + (index + 1) + (_index + 1) + (itemIndex + 1)} content={item} selector={'null_' + (index + 1) + (_index + 1) + (itemIndex + 1)}
></MarkdownToHtml>:<QuillForEditor ></MarkdownToHtml>:<QuillForEditor
readOnly={true} readOnly={true}
style={{ float: 'left', display: 'inline-block' ,padding:'0px',margin: '2px 0px 0px'}} style={{ float: 'left', display: 'inline-block' ,padding:'0px',margin: '2px 0px 0px',overflow: 'unset !important'}}
value={this.setdata(item)} value={this.setdata(item)}
// showUploadImage={this.handleShowUploadImage} // showUploadImage={this.handleShowUploadImage}
/> />

@ -53,6 +53,7 @@ class QestionDisplayHeader extends Component{
} }
.ql-editor{ .ql-editor{
padding:0px !important; padding:0px !important;
overflow: unset !important;
} }
`}</style> `}</style>
<div className="font-16 fl"> <div className="font-16 fl">
@ -94,7 +95,7 @@ class QestionDisplayHeader extends Component{
!this.props.exercise||this.props.exercise&&this.props.exercise.is_md||this.props.question_type===6?<MarkdownToHtml content={question_title} selector={'qtitle_' + (index + 1)} style={{ display: 'inline-block', width:'100%' , margin: '10px 0px 15px' }} !this.props.exercise||this.props.exercise&&this.props.exercise.is_md||this.props.question_type===6?<MarkdownToHtml content={question_title} selector={'qtitle_' + (index + 1)} style={{ display: 'inline-block', width:'100%' , margin: '10px 0px 15px' }}
></MarkdownToHtml>:<QuillForEditor ></MarkdownToHtml>:<QuillForEditor
style={{ display: 'inline-block', width:'100%' , margin: '10px 0px 15px',padding:'0px'}} style={{ display: 'inline-block', width:'100%' , margin: '10px 0px 15px',padding:'0px',overflow: 'unset !important'}}
readOnly={true} readOnly={true}
value={this.setdata(question_title)} value={this.setdata(question_title)}
// showUploadImage={this.handleShowUploadImage} // showUploadImage={this.handleShowUploadImage}

@ -124,7 +124,7 @@ class ShixunDisplay extends Component{
> >
</div>:<QuillForEditor </div>:<QuillForEditor
readOnly={true} readOnly={true}
style={{ float: 'left', display: 'inline-block' ,padding:'0px',margin: '2px 0px 0px'}} style={{ float: 'left', display: 'inline-block' ,padding:'0px',margin: '2px 0px 0px',overflow: 'unset !important'}}
value={this.setdata(question_title)} value={this.setdata(question_title)}
// showUploadImage={this.handleShowUploadImage} // showUploadImage={this.handleShowUploadImage}
/>} />}

@ -49,18 +49,18 @@ class ShixunProgramming extends Component{
`}</style> `}</style>
<QestionDisplayHeader {...this.props} question_title={question_title} <QestionDisplayHeader {...this.props} question_title={question_title}
topRight={
></QestionDisplayHeader>
{/* topRight={
<a target="_blank" href={`/problems/${hack_identifier}/edit`} className="mr30" <a target="_blank" href={`/problems/${hack_identifier}/edit`} className="mr30"
style={{color: '#4CACFF'}} style={{color: '#4CACFF'}}
>实训详情</a> >实训详情</a>
} }*/}
></QestionDisplayHeader>
{description&& {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&&this.props.exercise.is_md?<MarkdownToHtml content={description} selector={'qtitle_' + (index + 1)} style={{ display: 'inline-block', width:'100%' , margin: '10px 0px 15px' }}
></MarkdownToHtml>:<QuillForEditor ></MarkdownToHtml>:<QuillForEditor
style={{ display: 'inline-block', width:'100%' , margin: '10px 0px 15px',padding:'0px'}} style={{ display: 'inline-block', width:'100%' , margin: '10px 0px 15px',padding:'0px',overflow: 'unset !important'}}
readOnly={true} readOnly={true}
value={this.setdata(description)} value={this.setdata(description)}
// showUploadImage={this.handleShowUploadImage} // showUploadImage={this.handleShowUploadImage}

@ -72,6 +72,7 @@ class SingleDisplay extends Component{
} }
.ql-editor{ .ql-editor{
padding:0px !important; padding:0px !important;
overflow: unset !important;
} }
`}</style> `}</style>
@ -95,7 +96,7 @@ class SingleDisplay extends Component{
></MarkdownToHtml>:<QuillForEditor ></MarkdownToHtml>:<QuillForEditor
readOnly={true} readOnly={true}
style={{ float: 'left', display: 'inline-block',padding:'0px',margin: '2px 0px 0px'}} style={{ float: 'left', display: 'inline-block',padding:'0px',margin: '2px 0px 0px',overflow: 'unset !important'}}
value={this.setdata(item.choice_text)} value={this.setdata(item.choice_text)}
// showUploadImage={this.handleShowUploadImage} // showUploadImage={this.handleShowUploadImage}
/>} />}
@ -113,7 +114,7 @@ class SingleDisplay extends Component{
></MarkdownToHtml>:<QuillForEditor ></MarkdownToHtml>:<QuillForEditor
readOnly={true} readOnly={true}
style={{ float: 'left', display: 'inline-block' ,padding:'0px',margin: '2px 0px 0px'}} style={{ float: 'left', display: 'inline-block' ,padding:'0px',margin: '2px 0px 0px',overflow: 'unset !important'}}
value={this.setdata(item.choice_text)} value={this.setdata(item.choice_text)}
// showUploadImage={this.handleShowUploadImage} // showUploadImage={this.handleShowUploadImage}
/>} />}

Loading…
Cancel
Save