Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_forum
杨树林 5 years ago
commit ad5067bebe

@ -914,7 +914,7 @@ class CoursesController < ApplicationController
teacher_already_exist = current_user.teacher_of_course_non_active? course
unless teacher_already_exist
existing_course_message = CourseMessage.find_by(course_id: course.id, course_message_id: current_user.id,
course_message_type: "JoinCourseRequest", status: 0, viewed: false)
course_message_type: "JoinCourseRequest", status: 0)
if existing_course_message.blank?
course_message = CourseMessage.new(course_id: course.id, user_id: course.tea_id, status: 0,
course_message_id: current_user.id, course_message_type: "JoinCourseRequest",
@ -928,6 +928,8 @@ class CoursesController < ApplicationController
ApplyTeacherRoleJoinCourseNotifyJob.perform_later(current_user.id, course.id, role)
teacher_role = 1
message = "#{course_message.content == 2 ? '助教' : '教师'}申请已提交,请等待审核"
else
message = "#{existing_course_message.content == 2 ? '助教' : '教师'}申请已提交,请等待审核"
end
end
end
@ -941,7 +943,7 @@ class CoursesController < ApplicationController
end
rescue => e
uid_logger(e.message)
tip_exception("加入课堂失败")
tip_exception(e.message)
raise ActiveRecord::Rollback
end
end

Loading…
Cancel
Save