dev_cs_new
cxt 6 years ago
parent a8a6374c67
commit 7f591bd4b2

@ -911,6 +911,7 @@ class CoursesController < ApplicationController
CourseAddStudentCreateWorksJob.perform_later(course.id, [current_user.id]) CourseAddStudentCreateWorksJob.perform_later(course.id, [current_user.id])
StudentJoinCourseNotifyJob.perform_later(current_user.id, course.id) StudentJoinCourseNotifyJob.perform_later(current_user.id, course.id)
end end
student_role = 1
end end
# 创建教师身份 # 创建教师身份
@ -940,9 +941,9 @@ class CoursesController < ApplicationController
teacher_role = 1 teacher_role = 1
end end
if teacher_role && current_user.student_of_course?(course) if teacher_role && student_role
render json: { status: 0, message: message, course_id: course.id} render json: { status: 0, message: message, course_id: course.id}
elsif current_user.student_of_course?(course) elsif student_role
render json: { status: 0, message: "加入成功", course_id: course.id} render json: { status: 0, message: "加入成功", course_id: course.id}
else else
normal_status(message) normal_status(message)

Loading…
Cancel
Save