课程留言动态过滤掉

hjq_beidou
huang 9 years ago
parent c5bccf1adb
commit 3e2810129b

@ -105,7 +105,7 @@ class OrganizationsController < ApplicationController
end end
# 最新动态, 来自我关联的项目和课程 # 最新动态, 来自我关联的项目和课程
if @organization.org_subfields.where(:field_type => "Compact", :hide => 0).count > 0 if @organization.org_subfields.where(:field_type => "Compact", :hide => 0).count > 0
@acts = UserActivity.find_by_sql("SELECT * FROM `user_activities` where act_type in ('HomeworkCommon', 'News', 'Message', 'Issue', 'JournalsForMessage') and @acts = UserActivity.find_by_sql("SELECT * FROM `user_activities` where act_type in ('HomeworkCommon', 'News', 'Message', 'Issue') and
((container_type = 'Course' and container_id in (#{course_ids.join(',')})) or (container_type = 'Project' and container_id in (#{project_ids.join(',')}))) ((container_type = 'Course' and container_id in (#{course_ids.join(',')})) or (container_type = 'Project' and container_id in (#{project_ids.join(',')})))
order by updated_at desc limit 6;") order by updated_at desc limit 6;")
end end

Loading…
Cancel
Save