dev_forum
cxt 6 years ago
parent 10a72d7ae9
commit a807df07ed

@ -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",
@ -929,7 +929,7 @@ class CoursesController < ApplicationController
teacher_role = 1
message = "#{course_message.content == 2 ? '助教' : '教师'}申请已提交,请等待审核"
else
message = "#{existing_course_message.extra.to_i == 7 ? '助教' : '教师'}申请已提交,请等待审核"
message = "#{existing_course_message.content == 2 ? '助教' : '教师'}申请已提交,请等待审核"
end
end
end
@ -943,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