diff --git a/public/react/src/modules/courses/busyWork/CommonWorkItem.js b/public/react/src/modules/courses/busyWork/CommonWorkItem.js index 2ac4761e1..f30e43d21 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkItem.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkItem.js @@ -97,13 +97,6 @@ class CommonWorkItem extends Component{ setupdate = () => { } - toCreateProject = () => { - if (window.location.port == 3007) { - window.location.href = '/testbdweb.educoder.net/projects/new' - } else { - window.location.href = '/projects/new' - } - } render(){ let { mainList,workType }=this.props; const { aModalVisible, fileList, revise_reason } = this.state diff --git a/public/react/src/modules/courses/busyWork/ConnectProject.js b/public/react/src/modules/courses/busyWork/ConnectProject.js index 73a4da8f8..c1fd4185c 100644 --- a/public/react/src/modules/courses/busyWork/ConnectProject.js +++ b/public/react/src/modules/courses/busyWork/ConnectProject.js @@ -85,13 +85,6 @@ class ConnectProject extends Component{ console.log(error); }) } - toCreateProject = () => { - if (window.location.port == 3007) { - window.location.href = '/testbdweb.educoder.net/projects/new' - } else { - window.location.href = '/projects/new' - } - } //关联项目 openConnectionProject=(work)=>{ this.work = work; @@ -175,7 +168,7 @@ class ConnectProject extends Component{ { (!haveProjects) &&
- 您当前尚未管理任何项目,请先创建项目再关联 + 您当前尚未管理任何项目,请先创建项目再关联
} diff --git a/public/react/src/modules/courses/busyWork/NewWork.js b/public/react/src/modules/courses/busyWork/NewWork.js index a6fc93c92..c30832c8f 100644 --- a/public/react/src/modules/courses/busyWork/NewWork.js +++ b/public/react/src/modules/courses/busyWork/NewWork.js @@ -477,7 +477,7 @@ class NewWork extends Component{ ~ {/* min={has_commit ? init_max_num : (min_num == undefined ? 2 : min_num + 1) } */} - diff --git a/public/react/src/modules/courses/busyWork/common.js b/public/react/src/modules/courses/busyWork/common.js index 61bd7fcee..9eb901d9d 100644 --- a/public/react/src/modules/courses/busyWork/common.js +++ b/public/react/src/modules/courses/busyWork/common.js @@ -17,6 +17,13 @@ export function RouteHOC(options = {}) { } } + toCreateProject = () => { + if (window.location.port == 3007) { + window.location.href = '/testbdweb.educoder.net/projects/new' + } else { + window.location.href = '/projects/new' + } + } // common_homework group_homework // 是否是分组作业 isGroup = () => { @@ -156,7 +163,7 @@ export function RouteHOC(options = {}) { toWorkQuestionPage={this.toWorkQuestionPage} toWorkSettingPage={this.toWorkSettingPage} - + toCreateProject={this.toCreateProject} isGroup={this.isGroup} getModuleName={this.getModuleName} diff --git a/public/react/src/modules/courses/exercise/ExerciseDisplay.js b/public/react/src/modules/courses/exercise/ExerciseDisplay.js index 5992210b4..4da4768d2 100644 --- a/public/react/src/modules/courses/exercise/ExerciseDisplay.js +++ b/public/react/src/modules/courses/exercise/ExerciseDisplay.js @@ -69,20 +69,23 @@ class ExerciseDisplay extends Component{ return(
-
+
{exercise&&exercise.exercise_name}
-
{exercise&&exercise.exercise_description}
+
{exercise&&exercise.exercise_description}
-
+

{ exercise_types && exercise_types.q_singles > 0 && 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/NullChildEditor.js b/public/react/src/modules/courses/exercise/new/NullChildEditor.js index a78028b20..434211f1d 100644 --- a/public/react/src/modules/courses/exercise/new/NullChildEditor.js +++ b/public/react/src/modules/courses/exercise/new/NullChildEditor.js @@ -39,14 +39,14 @@ class NullChildEditor extends Component{ let { question_title, question_score, question_type, question_choices, standard_answers } = this.state; let { question_id, index, onAnswerChange, addChildAnswer, toMDMode, exerciseIsPublish, answers } = this.props; - + // marginTop: '18px' return( -
+
答案(填空{index + 1}):
{ answers.map((item, itemIndex) => { - return
+ return
diff --git a/public/react/src/modules/courses/exercise/new/SingleDisplay.js b/public/react/src/modules/courses/exercise/new/SingleDisplay.js index 8973d53db..453cce229 100644 --- a/public/react/src/modules/courses/exercise/new/SingleDisplay.js +++ b/public/react/src/modules/courses/exercise/new/SingleDisplay.js @@ -71,7 +71,7 @@ class SingleDisplay extends Component{ let length = 5; const qName = qNameArray[question_type] return( -
+