diff --git a/app/assets/javascripts/admins/courses/index.js b/app/assets/javascripts/admins/courses/index.js index 0e3473dff..58e962b8c 100644 --- a/app/assets/javascripts/admins/courses/index.js +++ b/app/assets/javascripts/admins/courses/index.js @@ -19,7 +19,7 @@ $(document).on('turbolinks:load', function() { var json = {}; json[s_name] = s_value; $.ajax({ - url: "/admins/courses/" + s_id, + url: "/admins/classrooms/" + s_id, type: "PUT", dataType:'script', data: json diff --git a/app/controllers/course_second_categories_controller.rb b/app/controllers/course_second_categories_controller.rb index b295c0f9f..62cbf83d9 100644 --- a/app/controllers/course_second_categories_controller.rb +++ b/app/controllers/course_second_categories_controller.rb @@ -36,10 +36,13 @@ class CourseSecondCategoriesController < ApplicationController # 更新相应对象的子目录id if @course_module.module_type == "shixun_homework" @category.homework_commons.update_all(course_second_category_id: 0) - @right_url = "/courses/#{@course.id}/shixun_homeworks/#{@course_module.id}" + @right_url = "/classrooms/#{@course.id}/shixun_homeworks/#{@course_module.id}" elsif @course_module.module_type == "attachment" Attachment.where(course_second_category_id: @category.id).update_all(course_second_category_id: 0) - @right_url = "/courses/#{@course.id}/files/#{@course_module.id}" + @right_url = "/classrooms/#{@course.id}/files/#{@course_module.id}" + elsif @course_module.module_type == "video" + @course.course_videos.where(course_second_category_id: @category.id).update_all(course_second_category_id: 0) + @right_url = "/classrooms/#{@course.id}/course_videos" end @category.destroy diff --git a/app/models/student_work.rb b/app/models/student_work.rb index 462e06adc..d695a6b00 100644 --- a/app/models/student_work.rb +++ b/app/models/student_work.rb @@ -46,13 +46,13 @@ class StudentWork < ApplicationRecord # 匿评次数 def student_comment_num - homework_common.homework_detail_manual.comment_status > 2 && work_status > 0 ? self.student_works_scores.select{|score| score.reviewer_role == 3}.group_by(&:user_id).count : 0 + homework_common.homework_detail_manual.comment_status > 2 && work_status > 0 ? self.student_works_scores.select{|score| score.reviewer_role == 3}.group_by(&:user_id).size : 0 end # 学生评阅作品数 def user_comment_num if homework_common.homework_detail_manual.comment_status > 2 && work_status > 0 - count = homework_common.student_works_scores.select{|score| score.reviewer_role == 3 && score.user_id == user_id}.group_by(&:student_work_id).count + count = homework_common.student_works_scores.select{|score| score.reviewer_role == 3 && score.user_id == user_id}.group_by(&:student_work_id).size else count = 0 end diff --git a/app/views/admins/courses/shared/_td.html.erb b/app/views/admins/courses/shared/_td.html.erb index 51cc4b199..87e6f305d 100644 --- a/app/views/admins/courses/shared/_td.html.erb +++ b/app/views/admins/courses/shared/_td.html.erb @@ -1,7 +1,7 @@ <%= list_index_no((params[:page] || 1).to_i, no) %> <%= course.id %> - <%= link_to(course.name, "/courses/#{course.id}", target: '_blank') %> + <%= link_to(course.name, "/classrooms/#{course.id}", target: '_blank') %> <%= course.course_members_count %> <%= get_attachment_count(course, 0) %> diff --git a/app/views/colleges/_course_statistics.html.erb b/app/views/colleges/_course_statistics.html.erb index e10739fb2..e544cf660 100644 --- a/app/views/colleges/_course_statistics.html.erb +++ b/app/views/colleges/_course_statistics.html.erb @@ -17,7 +17,7 @@ <% if @courses.present? %> <% @courses.each do |course| %> - <%= course.name %> + <%= course.name %> <% teacher_names = course.teacher_users.map(&:real_name).join('、') %> diff --git a/app/views/course_groups/destroy.json.jbuilder b/app/views/course_groups/destroy.json.jbuilder index 0fbd93d7f..a45cbd750 100644 --- a/app/views/course_groups/destroy.json.jbuilder +++ b/app/views/course_groups/destroy.json.jbuilder @@ -1,3 +1,3 @@ json.status 0 json.message "删除成功" -json.right_url "/courses/#{@course.id}/students" \ No newline at end of file +json.right_url "/classrooms/#{@course.id}/students" \ No newline at end of file diff --git a/app/views/courses/left_banner.json.jbuilder b/app/views/courses/left_banner.json.jbuilder index f3b80b4f5..ecd8fe127 100644 --- a/app/views/courses/left_banner.json.jbuilder +++ b/app/views/courses/left_banner.json.jbuilder @@ -21,7 +21,7 @@ json.course_modules @course_modules.each do |mod| json.position board.position json.category_count board.messages_count json.category_type "messages" - json.second_category_url "/courses/#{@course.id}/boards/#{board.id}" + json.second_category_url "/classrooms/#{@course.id}/boards/#{board.id}" end end else diff --git a/app/views/users/get_navigation_info.json.jbuilder b/app/views/users/get_navigation_info.json.jbuilder index 8af3691f3..a9f835501 100644 --- a/app/views/users/get_navigation_info.json.jbuilder +++ b/app/views/users/get_navigation_info.json.jbuilder @@ -4,11 +4,11 @@ json.top do json.course_url "/courses" json.competitions_url "#{@old_domain}/competitions" json.topic_url "/forums" - json.new_course_url "/courses/new" + json.new_course_url "/classrooms/new" json.new_shixun_url "/shixuns/new" json.new_shixun_path_url "/paths/new" json.new_project_url "#{@old_domain}/projects/new" - json.join_course_url "/courses/join_course_multi_role" + json.join_course_url "/classrooms/join_course_multi_role" json.join_project_url "#{@old_domain}/applied_project/applied_project_info" json.message_url "#{@user_url}/user_tidings" json.new_message @new_message diff --git a/public/react/src/modules/courses/Resource/index.js b/public/react/src/modules/courses/Resource/index.js index 787865219..8f32699ce 100644 --- a/public/react/src/modules/courses/Resource/index.js +++ b/public/react/src/modules/courses/Resource/index.js @@ -916,7 +916,7 @@ class Fileslists extends Component{ { ` .filesnameslist{ - max-width: 486px; + max-width: 389px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; diff --git a/public/react/src/modules/courses/busyWork/CommonWorkList.js b/public/react/src/modules/courses/busyWork/CommonWorkList.js index 42ca215ba..6125c3e02 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkList.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkList.js @@ -285,7 +285,23 @@ function buildColumns(that, student_works, studentData) { ), }) } + if (that.state.anonymous_comment) { + /** + 开启了匿评的才显示此列 + */ + columns.push({ + width: 84, + title:
已评数
, + key: 'user_comment_count', + dataIndex: 'user_comment_count', + render: (student_score, record) => ( + + {record.user_comment_count} + + ), + }) + } if (that.state.anonymous_appeal) { columns.push({ width: 70, diff --git a/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js b/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js index b4912f6c4..6569b4f10 100644 --- a/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js +++ b/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js @@ -181,6 +181,7 @@ class Coursesleftnav extends Component{ } componentDidMount() { + this.setState({ url:this.props.match.url }) diff --git a/public/react/src/modules/courses/shixunHomework/shixunHomework.js b/public/react/src/modules/courses/shixunHomework/shixunHomework.js index 605c649d8..e32479735 100644 --- a/public/react/src/modules/courses/shixunHomework/shixunHomework.js +++ b/public/react/src/modules/courses/shixunHomework/shixunHomework.js @@ -1179,7 +1179,7 @@ class ShixunHomework extends Component{ {datas===undefined?"":datas.homeworks && datas.homeworks.length>1?this.props.isAdminOrCreator()===true?datas&&datas.category_name===undefined||datas&&datas.category_name===null? - 调整排序 + 调整排序 :"":"":""} diff --git a/public/react/src/modules/question/component/QuestionModal.js b/public/react/src/modules/question/component/QuestionModal.js index 87338faa7..65224f26d 100644 --- a/public/react/src/modules/question/component/QuestionModal.js +++ b/public/react/src/modules/question/component/QuestionModal.js @@ -41,7 +41,13 @@ class QuestionModal extends Component { "" }
- this.props.modalCancel()}>取消 + { + this.props.titilesm&&this.props.titilesm==="功能正在内测中,敬请期待"? + "" + : + this.props.modalCancel()}>取消 + } + this.props.setDownload()}>{this.props.boolok?this.props.boolok:"确定"}