|
|
|
@ -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
|
|
|
|
|