|
|
|
@ -107,7 +107,7 @@ class OrganizationsController < ApplicationController
|
|
|
|
|
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') and
|
|
|
|
|
((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 created_at desc limit 6;")
|
|
|
|
|
end
|
|
|
|
|
render :layout => 'base_org_custom'
|
|
|
|
|
else
|
|
|
|
@ -273,7 +273,7 @@ class OrganizationsController < ApplicationController
|
|
|
|
|
course_ids = (@organization.courses.map(&:id) - shield_course_ids) << 0
|
|
|
|
|
@org_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(',')})))
|
|
|
|
|
order by updated_at desc limit 6;")
|
|
|
|
|
order by created_at desc limit 6;")
|
|
|
|
|
respond_to do |format|
|
|
|
|
|
format.html{render :layout => 'base_org_custom'}
|
|
|
|
|
format.js
|
|
|
|
|