From 9abe730dff33946cbd22e996a04e8d26e1b3fdfd Mon Sep 17 00:00:00 2001 From: z9hang Date: Fri, 12 Dec 2014 18:06:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=81=A2=E5=A4=8D=E7=A7=81=E6=9C=89=E8=AF=BE?= =?UTF-8?q?=E7=A8=8B=E7=9A=84=E5=85=AC=E5=BC=80=E8=B5=84=E6=BA=90=E4=B8=8D?= =?UTF-8?q?=E8=83=BD=E5=BC=95=E7=94=A8=E9=97=AE=E9=A2=98=EF=BC=88=E5=AF=BC?= =?UTF-8?q?=E8=87=B4=E6=90=9C=E7=B4=A2=E9=80=9F=E5=BA=A6=E6=85=A2=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/files_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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