#1709测试版--课程--加入课程:成功加入课程,还是显示为“加入”,需手动刷新页面

This commit is contained in:
sw 2014-12-23 11:05:31 +08:00
parent f68e62d1c1
commit f834759d84
1 changed files with 1 additions and 1 deletions

View File

@ -98,7 +98,7 @@ module WatchersHelper
# modify by nwb
# 主讲教师不允许退出课程
return '' if user.id == course.tea_id
joined = user.member_of_course?(course)
joined = course.members.map{|m| m.user}.include? user
text = joined ? l(:label_exit_course) : l(:label_new_join)
url = joined ? join_path(:object_id => course.id) : try_join_path(:object_id => course.id)
method = joined ? 'delete' : 'post'