|
|
@ -560,6 +560,8 @@ class CoursesController < ApplicationController
|
|
|
|
member = CourseMember.create(course_id: @course.id, graduation_group_id: @graduation_group_id, user_id: user_id, role: role, is_active: is_active)
|
|
|
|
member = CourseMember.create(course_id: @course.id, graduation_group_id: @graduation_group_id, user_id: user_id, role: role, is_active: is_active)
|
|
|
|
|
|
|
|
|
|
|
|
member.teacher_course_groups << TeacherCourseGroup.new(course_group_id: @course_group_id, user_id: user_id, course_id: @course.id) if @course_group_id != 0
|
|
|
|
member.teacher_course_groups << TeacherCourseGroup.new(course_group_id: @course_group_id, user_id: user_id, course_id: @course.id) if @course_group_id != 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@course.course_messages.join_course_requests.unhandled.where(course_message_id: user_id).update!(status: :PASSED)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
TeacherInviteJoinCourseNotifyJob.perform_later(current_user.id, @course.id, role, teacher_ids) if teacher_ids.present?
|
|
|
|
TeacherInviteJoinCourseNotifyJob.perform_later(current_user.id, @course.id, role, teacher_ids) if teacher_ids.present?
|
|
|
|