dev_bj
cxt 6 years ago
parent d60b46b791
commit 9bd9e16d3b

@ -6490,7 +6490,7 @@ def visable_attachemnts_incourse course
member = course.members.where(:user_id => User.current.id).first
if member.try(:course_group_id).to_i == 0 && attachment.unified_setting
result << attachment
elsif attachment.attachment_group_settings.where("course_group_id = #{member.try(:course_group_id)} and publish_time > '#{Time.now}'").count == 0
elsif attachment.attachment_group_settings.where("course_group_id = #{member.try(:course_group_id).to_i} and publish_time > '#{Time.now}'").count == 0
result << attachment
end
end

Loading…
Cancel
Save