From 3c74a9bd0e117c3764d4201e638fd84ea8c5bf0d Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Thu, 12 Mar 2020 16:33:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=AD=90=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/course_second_categories_controller.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/controllers/course_second_categories_controller.rb b/app/controllers/course_second_categories_controller.rb index 62cbf83d9..c59ffbdbe 100644 --- a/app/controllers/course_second_categories_controller.rb +++ b/app/controllers/course_second_categories_controller.rb @@ -43,6 +43,12 @@ class CourseSecondCategoriesController < ApplicationController 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" + elsif @course_module.module_type == "common_homework" + @category.homework_commons.update_all(course_second_category_id: 0) + @right_url = "/classrooms/#{@course.id}/common_homeworks/#{@course_module.id}" + elsif @course_module.module_type == "group_homework" + @category.homework_commons.update_all(course_second_category_id: 0) + @right_url = "/classrooms/#{@course.id}/group_homeworks/#{@course_module.id}" end @category.destroy