@ -70,6 +70,14 @@ class OrganizationsController < ApplicationController
@org_activities=OrgActivity.where("container_type = 'Project' and org_act_type = 'Message' and container_id in (#{project_ids.join(',')})").order('updated_at desc').page(params[:page]||1).per(10)
when'org'
@org_activities=OrgActivity.where("container_id =? and container_type =?",@organization.id,'Organization').order('updated_at desc').page(params[:page]||1).per(10)
when'course_homework'
@org_activities=OrgActivity.where("container_type = 'Course' and org_act_type = 'HomeworkCommon' and container_id in (#{course_ids.join(',')})").order('updated_at desc').page(params[:page]||1).per(10)
when'course_news'
@org_activities=OrgActivity.where("container_type = 'Course' and org_act_type = 'News' and container_id in (#{course_ids.join(',')})").order('updated_at desc').page(params[:page]||1).per(10)
when'course_message'
@org_activities=OrgActivity.where("container_type = 'Course' and org_act_type = 'Message' and container_id in (#{course_ids.join(',')})").order('updated_at desc').page(params[:page]||1).per(10)
when'course_poll'
@org_activities=OrgActivity.where("container_type = 'Course' and org_act_type = 'Poll' and container_id in (#{course_ids.join(',')})").order('updated_at desc').page(params[:page]||1).per(10)