|
|
|
@ -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(shixuns.id, #{order_ids})")
|
|
|
|
|
shixuns = stage.shixuns.no_jupyter.published.where(id: params[:shixun_ids]).reorder("field(shixuns.id, #{order_ids})")
|
|
|
|
|
shixuns.each do |shixun|
|
|
|
|
|
homework = HomeworksService.new.create_homework shixun, @course, category, current_user
|
|
|
|
|
homework_ids << homework.id
|
|
|
|
|