From 3c8bcc347ba13b1ca299acd9f4d0a1474a975bad Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Fri, 7 Feb 2020 19:47:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E8=B7=B5=E8=AF=BE=E7=A8=8B=E5=8F=91?= =?UTF-8?q?=E9=80=81=E8=87=B3=E4=BD=9C=E4=B8=9A=E6=8C=89=E9=A1=BA=E5=BA=8F?= =?UTF-8?q?=E5=8F=91=E9=80=81?= 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 6e6eb04fa..1dd1d73a2 100644 --- a/app/controllers/subjects_controller.rb +++ b/app/controllers/subjects_controller.rb @@ -259,7 +259,7 @@ class SubjectsController < ApplicationController CourseSecondCategory.create!(name: stage.name, course_id: @course.id, category_type: "shixun_homework", course_module_id: course_module.id, position: course_module.course_second_categories.count + 1) - shixuns = stage.shixuns.no_jupyter.published.where(id: params[:shixun_ids]).order("field(id, #{order_ids})") + shixuns = stage.shixuns.no_jupyter.published.where(id: params[:shixun_ids]).order("field(shixuns.id, #{order_ids})") shixuns.each do |shixun| homework = HomeworksService.new.create_homework shixun, @course, category, current_user homework_ids << homework.id