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

Loading…
Cancel
Save