|
|
|
@ -930,6 +930,7 @@ class HomeworkCommonsController < ApplicationController
|
|
|
|
|
shixuns.each do |shixun|
|
|
|
|
|
homework = HomeworksService.new.create_homework shixun, @course, @category, current_user
|
|
|
|
|
@homework_ids << homework.id
|
|
|
|
|
CreateStudentWorkJob.perform_later(homework.id)
|
|
|
|
|
end
|
|
|
|
|
rescue Exception => e
|
|
|
|
|
uid_logger(e.message)
|
|
|
|
@ -1031,6 +1032,7 @@ class HomeworkCommonsController < ApplicationController
|
|
|
|
|
stage.shixuns.where.not(shixuns: {id: none_shixun_ids}).unhidden.each do |shixun|
|
|
|
|
|
homework = HomeworksService.new.create_homework shixun, @course, category, current_user
|
|
|
|
|
@homework_ids << homework.id
|
|
|
|
|
CreateStudentWorkJob.perform_later(homework.id)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|