diff --git a/app/helpers/files_helper.rb b/app/helpers/files_helper.rb index de87b5c8a..aace20e6c 100644 --- a/app/helpers/files_helper.rb +++ b/app/helpers/files_helper.rb @@ -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