|
|
@ -4,7 +4,7 @@ class CourseDeleteStudentDeleteWorksJob < ApplicationJob
|
|
|
|
def perform(course_id, student_ids)
|
|
|
|
def perform(course_id, student_ids)
|
|
|
|
course = Course.find_by(id: course_id)
|
|
|
|
course = Course.find_by(id: course_id)
|
|
|
|
return if course.blank?
|
|
|
|
return if course.blank?
|
|
|
|
course = self.course
|
|
|
|
|
|
|
|
student_works = StudentWork.joins(:homework_common).where(user_id: student_ids, homework_commons: {course_id: course.id})
|
|
|
|
student_works = StudentWork.joins(:homework_common).where(user_id: student_ids, homework_commons: {course_id: course.id})
|
|
|
|
student_works.update_all(is_delete: 1)
|
|
|
|
student_works.update_all(is_delete: 1)
|
|
|
|
|
|
|
|
|
|
|
|