From 8d6aee1f1dfc7020b75e388d654b9925388046eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Tue, 10 Mar 2020 14:52:34 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E5=A0=82url=E6=8A=8Acourses=E6=94=B9?= =?UTF-8?q?=E6=88=90classrooms=20=2078=E5=A4=84=E5=9C=B0=E6=96=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../user_mailer/course_message_email.html.erb | 2 +- public/react/src/App.css | 4 +- public/react/src/App.js | 2 +- public/react/src/college/College.js | 2 +- .../Competitioncommon/CompetitionCommon.js | 12 +- .../react/src/modules/courses/BoardIndex.js | 200 ++++++------ public/react/src/modules/courses/Index.js | 144 ++++----- .../src/modules/courses/ListPageIndex.js | 48 +-- .../modules/courses/Resource/Fileslistitem.js | 4 +- .../src/modules/courses/boards/BoardsNew.js | 32 +- .../src/modules/courses/boards/TopicDetail.js | 2 +- .../src/modules/courses/boards/common.js | 132 ++++---- .../courses/busyWork/CommonWorkDetailIndex.js | 20 +- .../courses/busyWork/CommonWorkItem.js | 52 ++-- .../courses/busyWork/CommonWorkList.js | 4 +- .../busyWork/CommonWorkListTemplate.js | 18 +- .../courses/busyWork/CommonWorkPost.js | 10 +- .../courses/busyWork/CommonWorkSetting.js | 6 +- .../src/modules/courses/busyWork/Index.js | 284 +++++++++--------- .../modules/courses/busyWork/IndexGroup.js | 280 ++++++++--------- .../src/modules/courses/busyWork/NewWork.js | 4 +- .../busyWork/common/WorkDetailPageHeader.js | 16 +- .../courses/coursesDetail/CoursesBanner.js | 22 +- .../courses/coursesDetail/CoursesLeftNav.js | 8 +- .../courses/coursesHome/CoursesHome.js | 4 +- .../courses/coursesPublic/Addcourses.js | 6 +- .../courses/exercise/Ecerciseallbackagain.js | 4 +- .../src/modules/courses/exercise/Exercise.js | 4 +- .../courses/exercise/ExerciseListItem.js | 28 +- .../modules/courses/exercise/ExerciseNew.js | 18 +- .../courses/exercise/ExerciseNewCommon.js | 62 ++-- .../exercise/Studentshavecompletedthelist.js | 8 +- .../exercise/Testpapersettinghomepage.js | 18 +- .../graduation/tasks/GraduateTaskItem.js | 28 +- .../graduation/tasks/GraduationAcross.js | 28 +- .../graduation/tasks/GraduationTaskDetail.js | 34 +-- .../tasks/GraduationTasksSubmitedit.js | 10 +- .../tasks/GraduationTasksSubmitnew.js | 12 +- .../tasks/GraduationTasksappraise.js | 10 +- .../graduation/tasks/GraduationTasksedit.js | 14 +- .../graduation/tasks/GraduationTasksnew.js | 8 +- .../tasks/GraduationTaskssettinglist.js | 8 +- .../tasks/GraduationTaskssettingquestions.js | 6 +- .../modules/courses/graduation/tasks/index.js | 4 +- .../courses/graduation/topics/index.js | 6 +- .../courses/members/CourseGroupList.js | 6 +- .../modules/courses/members/studentsList.js | 14 +- .../src/modules/courses/new/CoursesNew.js | 6 +- .../src/modules/courses/new/Goldsubject.js | 2 +- .../src/modules/courses/ordering/Ordering.js | 6 +- public/react/src/modules/courses/poll/Poll.js | 32 +- .../modules/courses/poll/PollDetailIndex.js | 8 +- .../src/modules/courses/poll/PollInfo.js | 70 ++--- .../src/modules/courses/poll/PollListItem.js | 30 +- .../shixunHomework/Listofworksstudentone.js | 6 +- .../shixunHomework/ShixunStudentWork.js | 4 +- .../shixunHomework/ShixunWorkReport.js | 6 +- .../shixunHomework/ShixunhomeWorkItem.js | 24 +- .../Shixunworkdetails/ShixunWorkModal.js | 4 +- .../TraineetraininginformationModal.js | 4 +- .../shixunHomework/Workquestionandanswer.js | 6 +- .../modules/courses/statistics/Statistics.js | 1 + .../ecs/EcSetting/CourseSupports/index.js | 8 +- .../react/src/modules/ecs/EcSetting/index.js | 8 +- .../src/modules/ecs/curriculum/Curriculum.js | 12 +- .../ecs/curriculum/CurriculumSubpage.js | 4 +- .../react/src/modules/modals/Jointheclass.js | 2 +- public/react/src/modules/modals/SendTopics.js | 20 +- .../src/modules/paths/PathDetail/DetailTop.js | 4 +- .../modules/paths/PathDetail/OpenCourse.js | 6 +- public/react/src/modules/tpm/NewHeader.js | 16 +- public/react/src/modules/tpm/TPMIndexHOC.js | 4 +- .../modules/tpm/newshixuns/oldNewshixuns.js | 4 +- .../shixuns/shixusFunction/ShixunSearchBar.js | 284 +++++++++--------- .../modules/user/LoginRegisterComponent.js | 2 +- .../src/modules/user/usersInfo/InfosBanner.js | 4 +- .../src/modules/user/usersInfo/InfosCourse.js | 4 +- .../user/usersInfo/video/VideoProtocol.js | 8 +- 78 files changed, 1124 insertions(+), 1123 deletions(-) diff --git a/app/views/user_mailer/course_message_email.html.erb b/app/views/user_mailer/course_message_email.html.erb index b3e57b5a2..bdc3b66c3 100644 --- a/app/views/user_mailer/course_message_email.html.erb +++ b/app/views/user_mailer/course_message_email.html.erb @@ -38,7 +38,7 @@
您参与的课堂:<%= @course.name %>,有新的帖子发布了: - <%= @message.subject %> + <%= @message.subject %>
{this.isEdit ? "编辑" : "新建"}帖子
-
返回
@@ -346,7 +346,7 @@ class BoardsNew extends Component{
-
- {homework_name} + {homework_name}
{coursedata.teacher_applies_count===undefined?"":coursedata.teacher_applies_count>0?
您有{coursedata.teacher_applies_count}条新的加入申请
- this.setHistoryFun("/courses/"+this.props.match.params.coursesId+"/teachers?tab=2")}>
+ this.setHistoryFun("/classrooms/"+this.props.match.params.coursesId+"/teachers?tab=2")}>
待审批
:""}
}>
- this.setHistoryFun("/courses/"+this.props.match.params.coursesId+"/teachers")}>
+ this.setHistoryFun("/classrooms/"+this.props.match.params.coursesId+"/teachers")}>
教师
{coursedata.teacher_count}
@@ -763,7 +763,7 @@ background:rgba(204,204,204,0.2) !important;
共{exercises_counts && exercises_counts.exercises_total_counts}个试卷 已发布:{exercises_counts && exercises_counts.exercises_published_counts}个 - 未发布:{exercises_counts && exercises_counts.exercises_unpublish_counts}个 + 未发布:{exercises_counts && exercises_counts.exercises_unpublish_counts}个
- {/*{item.exercise_name}*/} + {/*{item.exercise_name}*/} { this.props.isAdmin()? this.toDetailPage(`/courses/${coursesId}/exercises/${item.id}/student_exercise_list?tab=0`)}>{item.exercise_name}:"" + onClick={()=>this.toDetailPage(`/classrooms/${coursesId}/exercises/${item.id}/student_exercise_list?tab=0`)}>{item.exercise_name}:"" } { this.props.isStudent()? - this.toDetailPage(`/courses/${coursesId}/exercises/${item.id}/student_exercise_list?tab=0`)}>{item.exercise_name}:"" + this.toDetailPage(`/classrooms/${coursesId}/exercises/${item.id}/student_exercise_list?tab=0`)}>{item.exercise_name}:"" } { this.props.isNotMember()? item.lock_status === 0 ? {item.exercise_name} - : this.toDetailPage(`/courses/${coursesId}/exercises/${item.id}/student_exercise_list?tab=0`)}>{item.exercise_name}:"" + : this.toDetailPage(`/classrooms/${coursesId}/exercises/${item.id}/student_exercise_list?tab=0`)}>{item.exercise_name}:"" } { @@ -189,9 +189,9 @@ class ExerciseListItem extends Component{ { IsAdmin &&
{this.isEdit ? "编辑" : "新建"}试卷 - this.props.history.length == 1 ? : this.props.history.goBack() - onClick={() => this.props.history.push(`/courses/${courseId}/exercises/${left_banner_id}`)}> + onClick={() => this.props.history.push(`/classrooms/${courseId}/exercises/${left_banner_id}`)}> 返回
@@ -91,4 +91,4 @@ class ExerciceNew extends Component{ } } // RouteHOC() -export default (ExerciceNew); \ No newline at end of file +export default (ExerciceNew); diff --git a/public/react/src/modules/courses/exercise/ExerciseNewCommon.js b/public/react/src/modules/courses/exercise/ExerciseNewCommon.js index 6d7c72b13..736f44308 100644 --- a/public/react/src/modules/courses/exercise/ExerciseNewCommon.js +++ b/public/react/src/modules/courses/exercise/ExerciseNewCommon.js @@ -79,7 +79,7 @@ class ExerciseNewCommon extends Component{ } fetchExercise = () => { - const Id = this.props.match.params.Id + const Id = this.props.match.params.Id this.isEdit = this.props.isEdit || !!Id if (this.isEdit) { const url = this.props.exercise_url ? `/${this.props.exercise_url }/${Id}.json` : `/exercises/${Id}/edit.json` @@ -194,15 +194,15 @@ class ExerciseNewCommon extends Component{ } if (exercise_questions[index].question_id) { // 编辑 this.setState( - (prevState) => ({ + (prevState) => ({ exercise_questions : update(prevState.exercise_questions, {[index]: { isNew: {$set: false}}}) - // update(prevState.exercise_questions, {$splice: [[index, 1]]}) + // update(prevState.exercise_questions, {$splice: [[index, 1]]}) }) ) } else { // 新建 this.setState( - (prevState) => ({ - exercise_questions : update(prevState.exercise_questions, {$splice: [[index, 1]]}) + (prevState) => ({ + exercise_questions : update(prevState.exercise_questions, {$splice: [[index, 1]]}) }) ) } @@ -214,7 +214,7 @@ class ExerciseNewCommon extends Component{ } if (this._checkIsEditing()) { return; - } + } if (type == Q_TYPE_SHIXUN) { this.addShixun(question_id_to_insert_after) } else { @@ -237,7 +237,7 @@ class ExerciseNewCommon extends Component{ // TODO 弹框选择实训 if (this._checkIsEditing()) { return; - } + } this.refs.shixunChooseModal.setVisible(true) this.question_id_to_insert_after = question_id_to_insert_after; return; @@ -249,11 +249,11 @@ class ExerciseNewCommon extends Component{ editQestion = (index) => { if (this._checkIsEditing()) { return; - } + } this.editingId = `#question_${index}` this.setState( - (prevState) => ({ + (prevState) => ({ exercise_questions : update(prevState.exercise_questions, {[index]: { isNew: {$set: true}}}) }) ) @@ -261,8 +261,8 @@ class ExerciseNewCommon extends Component{ onSort = (index, question_id, isUp) => { if (this._checkIsEditing()) { return; - } - + } + const url = `/${this.props.exercise_url_questions || 'exercise_questions'}/${question_id}/up_down.json` axios.post(url, { opr: isUp ? 'up' : 'down'}) .then((response) => { @@ -305,16 +305,16 @@ class ExerciseNewCommon extends Component{ const _indexBefore = question_id_to_insert_after ? this.findIndexById(question_id_to_insert_after) : this.state.exercise_questions.length - 1 for (let i = _indexBefore; i >= 0; i--) { if(this.state.exercise_questions[i].question_type == question_type) { - init_question_score = this.state.exercise_questions[i].question_score + init_question_score = this.state.exercise_questions[i].question_score break; } } return init_question_score; } addEditingQuestion = (question_type, question_id_to_insert_after, otherAttributes) => { - + let init_question_score = this.getInitScore(question_type, question_id_to_insert_after) - + let questionObj = { question_type: question_type, // 需要这个通过类型判断 init_question_score: init_question_score, @@ -325,7 +325,7 @@ class ExerciseNewCommon extends Component{ const { exercise_questions } = this.state; let new_exercise_questions = exercise_questions.slice(0) let newIndex = new_exercise_questions.length; - + if (question_id_to_insert_after) { const _indexBefore = this.findIndexById(question_id_to_insert_after) new_exercise_questions.splice(_indexBefore + 1, 0, questionObj) @@ -347,7 +347,7 @@ class ExerciseNewCommon extends Component{ return i; } } - } + } onQestionDelete = (question_id) => { this.props.confirm({ content: `确认要删除这个问题吗?`, @@ -363,15 +363,15 @@ class ExerciseNewCommon extends Component{ // const index = this.findIndexById(question_id) // this.setState( - // (prevState) => ({ - // exercise_questions : update(prevState.exercise_questions, {$splice: [[index, 1]]}) + // (prevState) => ({ + // exercise_questions : update(prevState.exercise_questions, {$splice: [[index, 1]]}) // }) // ) } }) .catch(function (error) { console.log(error); - }); + }); } }) } @@ -382,14 +382,14 @@ class ExerciseNewCommon extends Component{ 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`) + this.props.history.push(`/classrooms/${courseId}/exercises/${exercise_id}/student_exercise_list?tab=2`) } getAddQuestionUrl = () => { - const Id = this.props.match.params.Id + const Id = this.props.match.params.Id const url = this.props.exercise_url_questions ? `/${this.props.exercise_url_questions}.json` : `/exercises/${Id}/exercise_questions.json` return url; } - getEditQuestionUrl = (question_id) => { + getEditQuestionUrl = (question_id) => { const editUrl = this.props.exercise_url_questions ? `/${this.props.exercise_url_questions}/${question_id}.json` : `/exercise_questions/${question_id}.json` return editUrl; } @@ -400,7 +400,7 @@ class ExerciseNewCommon extends Component{ // return '' // } // const { getFieldDecorator } = this.props.form; - const { q_counts, q_scores, q_doubles, q_doubles_scores, q_judges, q_judges_scores, + const { q_counts, q_scores, q_doubles, q_doubles_scores, q_judges, q_judges_scores, q_mains, q_mains_scores, q_nulls, q_nulls_scores, q_shixuns, q_shixuns_scores, q_singles, q_singles_scores} = exercise_types; const formItemLayout = { labelCol: { @@ -458,7 +458,7 @@ class ExerciseNewCommon extends Component{ max-width: 1128px; } `} - + {!this.state.editMode &&
@@ -544,7 +544,7 @@ class ExerciseNewCommon extends Component{
{ !!q_shixuns && 实训题{q_shixuns}题,共{q_shixuns_scores}分 }
- { !!q_counts &&
+ { !!q_counts &&
合计 {q_counts} 题,
共 100 ? 'color-red font-bd' : 'color-orange'}`}>{q_scores} 分
@@ -582,7 +582,7 @@ class ExerciseNewCommon extends Component{
}
} else if (item.question_type == 5) {
if (item.isNew) {
- return
- {this.props.coursedata.name}
+ {this.props.coursedata.name}
>
- 试卷
+ 试卷
>
@@ -301,15 +301,15 @@ class GraduateTaskItem extends Component{
{
- this.props.isAdmin?this.toDetailPage("/courses/"+coursesId+"/graduation_tasks/"+categoryid+"/detail/"+taskid+"/list")}
+ this.props.isAdmin?this.toDetailPage("/classrooms/"+coursesId+"/graduation_tasks/"+categoryid+"/detail/"+taskid+"/list")}
title={discussMessage.name}
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}:""
}
{
- this.props.isStudent? this.toDetailPage("/courses/"+coursesId+"/graduation_tasks/"+categoryid+"/detail/"+taskid+"/list")}
+ this.props.isStudent? this.toDetailPage("/classrooms/"+coursesId+"/graduation_tasks/"+categoryid+"/detail/"+taskid+"/list")}
title={discussMessage.name}
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}:""
}
@@ -248,7 +248,7 @@ class GraduateTaskItem extends Component{
{
this.props.isNotMember===true?this.props.discussMessage.private_icon===true?
{discussMessage.name}
- :this.toDetailPage("/courses/"+coursesId+"/graduation_tasks/"+categoryid+"/"+taskid+"/list")}
+ :this.toDetailPage("/classrooms/"+coursesId+"/graduation_tasks/"+categoryid+"/"+taskid+"/list")}
title={discussMessage.name}
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}:""
}
@@ -267,7 +267,7 @@ class GraduateTaskItem extends Component{
{/* { !!discussMessage.sticky && 置顶 } */}
-
+