diff --git a/public/react/src/modules/courses/exercise/ExerciseNew.js b/public/react/src/modules/courses/exercise/ExerciseNew.js index 8bc7ed6ae..0e1489c72 100644 --- a/public/react/src/modules/courses/exercise/ExerciseNew.js +++ b/public/react/src/modules/courses/exercise/ExerciseNew.js @@ -342,6 +342,11 @@ class ExerciceNew extends Component{ this.editingId = null; 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() { let { exercise_name, exercise_description, course_id, exercise_types, exercise_questions, left_banner_id } = this.state; @@ -366,6 +371,8 @@ class ExerciceNew extends Component{ const isAdmin = this.props.isAdmin() const courseId=this.props.match.params.coursesId; + const exercise_id = this.props.match.params.Id + const isEdit = this.isEdit const commonHandler = { onQestionDelete: this.onQestionDelete, @@ -395,7 +402,7 @@ class ExerciceNew extends Component{ background: #fff; } .exerciseNew .markdown-body { - max-width: 1088px; + max-width: 1128px; } `}
@@ -546,6 +553,11 @@ class ExerciceNew extends Component{ this.addShixun(null)}> 实训题 + + {exercise_id && this.goToPreview()}> + {/* */} + 试卷预览 + }
} diff --git a/public/react/src/modules/courses/exercise/new/NullDisplay.js b/public/react/src/modules/courses/exercise/new/NullDisplay.js index e507829ed..e5c604767 100644 --- a/public/react/src/modules/courses/exercise/new/NullDisplay.js +++ b/public/react/src/modules/courses/exercise/new/NullDisplay.js @@ -80,12 +80,14 @@ class NullDisplay extends Component{ .answers .answer { background: #EDEDED; color: #C5C5C5; - width: 100%; + display: inline-block; line-height: 16px; padding:12px 10px; margin-bottom:10px; border-radius:2px; + max-width: 1024px; + word-break: break-all; } .answerRow { padding: 1px 0;