@courses=Course.joins("join users u on courses.tea_id = u.id").joins("join user_extensions ue on u.id = ue.user_id").where("ue.school_id = #{params[:school_id]}")
@courses=@courses.joins("join user_extensions ue on courses.tea_id = ue.user_id").where("ue.school_id = #{params[:school_id]}")
end
ifparams[:homepage_show]
@ -1819,7 +1819,7 @@ end
user_id=User.where("concat(lastname, firstname) like '%#{@search}%'")
@courses=@courses.joins("join users u on courses.tea_id = u.id").where("concat(u.lastname, u.firstname) like '%#{@search}%'")
end
else
elsif "dep_name"==@keyword
school=School.where("name like '%#{@search}%'").map(&:id)
@courses=@courses.where(:school_id=>school)
# @courses= @courses.where("name like '%#{@search}%'")