Merge branch 'szzh' into develop

This commit is contained in:
sw 2014-12-12 18:07:18 +08:00
commit b96de32b28
1 changed files with 1 additions and 1 deletions

View File

@ -107,7 +107,7 @@ module FilesHelper
def visable_attachemnts_insite attachments,course
result = []
attachments.each do |attachment|
if attachment_candown(attachment) || (attachment.container_type == "Course" && attachment.container_id == course.id && User.current.member_of_course?(Course.find(attachment.container_id)))|| attachment.author_id == User.current.id
if attachment.is_public? || (attachment.container_type == "Course" && attachment.container_id == course.id && User.current.member_of_course?(Course.find(attachment.container_id)))|| attachment.author_id == User.current.id
result << attachment
end
end