dev_forum
hjm 6 years ago
parent bbc689cc87
commit 341958003b

@ -342,6 +342,11 @@ class ExerciceNew extends Component{
this.editingId = null; this.editingId = null;
this.fetchExercise() this.fetchExercise()
} }
goToPreview = () => {
const exercise_id = this.props.match.params.Id
const courseId = this.props.match.params.coursesId
this.props.history.push(`/courses/${courseId}/exercises/${exercise_id}/student_exercise_list?tab=2`)
}
render() { render() {
let { exercise_name, exercise_description, course_id, exercise_types, let { exercise_name, exercise_description, course_id, exercise_types,
exercise_questions, left_banner_id } = this.state; exercise_questions, left_banner_id } = this.state;
@ -366,6 +371,8 @@ class ExerciceNew extends Component{
const isAdmin = this.props.isAdmin() const isAdmin = this.props.isAdmin()
const courseId=this.props.match.params.coursesId; const courseId=this.props.match.params.coursesId;
const exercise_id = this.props.match.params.Id
const isEdit = this.isEdit const isEdit = this.isEdit
const commonHandler = { const commonHandler = {
onQestionDelete: this.onQestionDelete, onQestionDelete: this.onQestionDelete,
@ -395,7 +402,7 @@ class ExerciceNew extends Component{
background: #fff; background: #fff;
} }
.exerciseNew .markdown-body { .exerciseNew .markdown-body {
max-width: 1088px; max-width: 1128px;
} }
`}</style> `}</style>
<div className="edu-class-container edu-position courseForm"> <div className="edu-class-container edu-position courseForm">
@ -546,6 +553,11 @@ class ExerciceNew extends Component{
<ActionBtn style="green" className="mr20" onClick={() => this.addShixun(null)}> <ActionBtn style="green" className="mr20" onClick={() => this.addShixun(null)}>
<i className="iconfont icon-tianjiafangda color-white font-14 mr5" style={{ marginTop: '-1px', display: 'inline-block'}}></i> <i className="iconfont icon-tianjiafangda color-white font-14 mr5" style={{ marginTop: '-1px', display: 'inline-block'}}></i>
</ActionBtn> </ActionBtn>
{exercise_id && <ActionBtn style="blue" className="fr" onClick={() => this.goToPreview()}>
{/* <i className="iconfont icon-tianjiafangda color-white font-14 mr5" style={{ marginTop: '-1px', display: 'inline-block'}}></i> */}
试卷预览
</ActionBtn>}
</div>} </div>}
</div> </div>

@ -80,12 +80,14 @@ class NullDisplay extends Component{
.answers .answer { .answers .answer {
background: #EDEDED; background: #EDEDED;
color: #C5C5C5; color: #C5C5C5;
width: 100%;
display: inline-block; display: inline-block;
line-height: 16px; line-height: 16px;
padding:12px 10px; padding:12px 10px;
margin-bottom:10px; margin-bottom:10px;
border-radius:2px; border-radius:2px;
max-width: 1024px;
word-break: break-all;
} }
.answerRow { .answerRow {
padding: 1px 0; padding: 1px 0;

Loading…
Cancel
Save