加入课程报403
This commit is contained in:
parent
0d66763026
commit
b5c9156c10
|
@ -749,7 +749,7 @@ module CoursesHelper
|
|||
if user.logged?
|
||||
joined = course.members.includes(:user).map{|member| member.user_id}.include? user.id
|
||||
text = joined ? l(:label_course_exit_student) : l(:label_course_join_student)
|
||||
url = joined ? join_path(:object_id => course.id) : try_join_path(:object_id => course.id)
|
||||
url = joined ? course_path(course.id) : try_join_path(:object_id => course.id)
|
||||
method = joined ? 'delete' : 'post'
|
||||
if joined
|
||||
link = link_to(text, url, :remote => true, :method => method, :class => "pr_join_a", :id => "#{course.id}", :confirm => l(:text_are_you_sure_out))
|
||||
|
|
Loading…
Reference in New Issue