diff --git a/app/controllers/organizations_controller.rb b/app/controllers/organizations_controller.rb index 56ffc77e2..2b31cae13 100644 --- a/app/controllers/organizations_controller.rb +++ b/app/controllers/organizations_controller.rb @@ -88,7 +88,7 @@ class OrganizationsController < ApplicationController shield_project_ids = ShieldActivity.where("container_type='Organization' and container_id=#{@organization.id} and shield_type='Project'").map(&:shield_id) shield_course_ids = ShieldActivity.where("container_type='Organization' and container_id=#{@organization.id} and shield_type='Course'").map(&:shield_id) project_ids = (@organization.projects.map(&:id) - shield_project_ids) << 0 - course_ids = (@organization.courses.map(&:id) - shield_course_ids) << 0 + course_ids = (@organization.courses.not_deleted.map(&:id) - shield_course_ids) << 0 course_types = "('Message','News','HomeworkCommon','Poll','Course')" @project_acts = get_project_activities_org @organization, project_ids @course_acts = get_course_activities_org @organization, course_ids @@ -140,7 +140,7 @@ class OrganizationsController < ApplicationController shield_project_ids = ShieldActivity.where("container_type='Organization' and container_id=#{@organization.id} and shield_type='Project'").map(&:shield_id) shield_course_ids = ShieldActivity.where("container_type='Organization' and container_id=#{@organization.id} and shield_type='Course'").map(&:shield_id) project_ids = (@organization.projects.map(&:id)-shield_project_ids) << 0 - course_ids = (@organization.courses.map(&:id)-shield_course_ids) << 0 + course_ids = (@organization.courses.not_deleted.map(&:id)-shield_course_ids) << 0 course_types = "('Message','News','HomeworkCommon','Poll','Course')" case params[:type] when nil