From d7ff92e0ed990fda2c9a74b8db7ad95aa04d5923 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Thu, 12 Mar 2020 19:13:26 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/courses_controller.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index a102f92de..7c4b20c86 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -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.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 TeacherInviteJoinCourseNotifyJob.perform_later(current_user.id, @course.id, role, teacher_ids) if teacher_ids.present?