|
|
|
@ -26,11 +26,6 @@ class CourseMember < ApplicationRecord
|
|
|
|
|
after_create :create_attendance_record
|
|
|
|
|
after_commit :create_attendance_record
|
|
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
|
|
def create_attendance_record
|
|
|
|
|
StudentJoinAttendanceRecordJob.perform_later(id)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def delete_works
|
|
|
|
|
if self.role == "STUDENT"
|
|
|
|
@ -166,4 +161,11 @@ class CourseMember < ApplicationRecord
|
|
|
|
|
end
|
|
|
|
|
teachers
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
|
|
def create_attendance_record
|
|
|
|
|
StudentJoinAttendanceRecordJob.perform_later(id)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|