diff --git a/app/controllers/add_school_applies_controller.rb b/app/controllers/add_school_applies_controller.rb index 22b3d360a..e0a09665d 100644 --- a/app/controllers/add_school_applies_controller.rb +++ b/app/controllers/add_school_applies_controller.rb @@ -1,5 +1,5 @@ class AddSchoolAppliesController < ApplicationController - before_action :require_login, :check_auth + before_action :require_login def create school = CreateAddSchoolApplyService.call(current_user, create_params) diff --git a/app/controllers/homework_commons_controller.rb b/app/controllers/homework_commons_controller.rb index 1641e98b9..f92ed8e2e 100644 --- a/app/controllers/homework_commons_controller.rb +++ b/app/controllers/homework_commons_controller.rb @@ -38,7 +38,7 @@ class HomeworkCommonsController < ApplicationController tip_exception("子目录id有误") if !@category.present? @homework_commons = @homework_commons.where(course_second_category_id: params[:category]) elsif @homework_type == 4 - @homework_commons = @homework_commons.where(course_second_category_id: 0) + @homework_commons = @homework_commons end @all_count = @homework_commons.size diff --git a/app/helpers/courses_helper.rb b/app/helpers/courses_helper.rb index fa51de6b7..8c2aeb479 100644 --- a/app/helpers/courses_helper.rb +++ b/app/helpers/courses_helper.rb @@ -199,7 +199,8 @@ module CoursesHelper # 获取课堂的作业数 def get_homework_commons_count(course, type, category_id) - HomeworkCommon.where(course_id: course.id, homework_type: type, course_second_category_id: category_id).size + category_id == 0 ? HomeworkCommon.where(course_id: course.id, homework_type: type).size : + HomeworkCommon.where(course_id: course.id, homework_type: type, course_second_category_id: category_id).size end diff --git a/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js b/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js index 707c4ba9b..ad7172be5 100644 --- a/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js +++ b/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js @@ -505,7 +505,7 @@ class Coursesleftnav extends Component{ }else if(NavmodalValue.length>20){ this.setState({ NavmodalValuetype:true, - NavmodalValues:"名称不能超过20个字" + NavmodalValues:"名称不能超过60个字" }) return } diff --git a/public/react/src/modules/paths/PathDetail/DetailCards.js b/public/react/src/modules/paths/PathDetail/DetailCards.js index 0e95f1a48..fc75961ec 100644 --- a/public/react/src/modules/paths/PathDetail/DetailCards.js +++ b/public/react/src/modules/paths/PathDetail/DetailCards.js @@ -469,7 +469,7 @@ class DetailCards extends Component{ { showparagraphkey===key&&showparagraphindex===index?
查看详情 - this.startgameid(line.identifier)} className="btn_auto user_bluebg_btn fl" id="shixun_operation" >开始实战 + {line.shixun_status==="暂未公开"?"":this.startgameid(line.identifier)} className="btn_auto user_bluebg_btn fl" id="shixun_operation" >开始实战}
:"" }