From 6fec75e59c3db738f9b2b9f20f28bf141e9175b5 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Wed, 11 Mar 2020 16:25:59 +0800 Subject: [PATCH] =?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 cb0d9bc35..6c5230013 100644 --- a/app/controllers/homework_commons_controller.rb +++ b/app/controllers/homework_commons_controller.rb @@ -34,7 +34,7 @@ class HomeworkCommonsController < ApplicationController module_type = @homework_type == 4 ? "shixun_homework" : @homework_type == 1 ? "common_homework" : "group_homework" @homework_commons = @course.homework_commons.where(homework_type: @homework_type) @main_category = @course.course_modules.find_by(module_type: module_type) - if @homework_type == 4 && !params[:category].blank? + if !params[:category].blank? @category = @main_category.course_second_categories.find_by(id: params[:category]) tip_exception("子目录id有误") if !@category.present? @homework_commons = @homework_commons.where(course_second_category_id: params[:category])