From 030e83ea10b3fd5e3cf76c8c87b4f6ed674d6a41 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 25 Jul 2019 18:52:16 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E7=94=B3=E8=AF=B7=E9=AB=98=E6=A0=A1?= =?UTF-8?q?=E5=85=81=E8=AE=B8=E5=AE=8C=E5=96=84=E8=B5=84=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/add_school_applies_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) From 0ed0caaa64b2538f7a9d6f2e5138a5606ad758f6 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Thu, 25 Jul 2019 18:55:48 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/homework_commons_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 651399837f07ad7155c9cdae16e2fb670e3340c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Thu, 25 Jul 2019 18:57:32 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react/src/modules/courses/coursesDetail/CoursesLeftNav.js | 2 +- public/react/src/modules/paths/PathDetail/DetailCards.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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" >开始实战}
:"" } From d6be63011f7cb45b5e9b7c808f03d060fdfe88f5 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Thu, 25 Jul 2019 18:59:18 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/courses_helper.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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