From cc7b01287a4caeb2f29b4c8c069912e77d1e1658 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Mon, 22 Jul 2019 14:32:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E9=80=81=E8=87=B3=E8=AF=BE=E5=A0=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/subjects_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/subjects_controller.rb b/app/controllers/subjects_controller.rb index 4d256f3dc..afaa3a1b6 100644 --- a/app/controllers/subjects_controller.rb +++ b/app/controllers/subjects_controller.rb @@ -191,7 +191,7 @@ class SubjectsController < ApplicationController stages.each do |stage| category = CourseSecondCategory.where(name: stage.name, course_id: @course.id, category_type: "shixun_homework").first || CourseSecondCategory.create!(name: stage.name, course_id: @course.id, category_type: "shixun_homework", - course_module_id: course_module, position: course_module.course_second_categories.count + 1) + course_module_id: course_module.id, position: course_module.course_second_categories.count + 1) stage.shixuns.where(id: params[:shixun_ids], status: 2).each do |shixun| homework = HomeworksService.new.create_homework shixun, @course, category, current_user