#1859 课程--资源库:全站搜索中“选入我的其他课程”弹出的课程列表中包括当前课程

This commit is contained in:
z9hang 2015-03-12 11:17:36 +08:00
parent 11da65c9ad
commit a05061af73
1 changed files with 1 additions and 1 deletions

View File

@ -48,7 +48,7 @@ module FilesHelper
def courses_check_box_tags(name,courses,current_course,attachment)
s = ''
courses.each do |course|
if !(attachment.container_type && attachment.container_id == course.id) && is_course_teacher(User.current,course) && course_in_current_or_next_term(course)
if !course_contains_attachment?(course,attachment) && is_course_teacher(User.current,course) && course_in_current_or_next_term(course)
s << "<label>#{ check_box_tag name, course.id, false, :id => nil } #{h course.name}</label>&nbsp;[#{get_course_term course}]<br/>"
end
end