组织动态报500
This commit is contained in:
parent
af1aa2cac4
commit
61836dbe93
|
@ -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_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)
|
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
|
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')"
|
course_types = "('Message','News','HomeworkCommon','Poll','Course')"
|
||||||
@project_acts = get_project_activities_org @organization, project_ids
|
@project_acts = get_project_activities_org @organization, project_ids
|
||||||
@course_acts = get_course_activities_org @organization, course_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_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)
|
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
|
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')"
|
course_types = "('Message','News','HomeworkCommon','Poll','Course')"
|
||||||
case params[:type]
|
case params[:type]
|
||||||
when nil
|
when nil
|
||||||
|
|
Loading…
Reference in New Issue