@ -225,7 +225,7 @@ class OrganizationsController < ApplicationController
if!params[:name].nil?
condition="%#{params[:name].strip}%".gsub("","")
end
sql="select projects.* from projects inner join members on projects.id = members.course_id where members.user_id = #{User.current.id} and projects.name like '#{condition}'"
sql="select projects.* from projects inner join members on projects.id = members.project_id where members.user_id = #{User.current.id} and projects.status != 9 and projects.name like '#{condition}'"
@ -3,7 +3,7 @@ class DeleteUselessOrgActivities < ActiveRecord::Migration
OrgActivity.all.eachdo|act|
ifact.container_type=='Course'
ifCourseActivity.where("course_act_type=? and course_act_id =? and course_id =?",act.org_act_type,act.org_act_id,act.container_id).count==0
puts"course"
act.destroy
end
else
ifact.container_type=='Project'andForgeActivity.where("forge_act_type=? and forge_act_id =? and project_id =?",act.org_act_type,act.org_act_id,act.container_id).count==0