dev_SaaS
huang 6 years ago
commit 0e445b3209

@ -1796,7 +1796,7 @@ end
@school_id = params[:school_id]
if params[:school_id] && params[:school_id] != ''
@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
if params[: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}%'")

Loading…
Cancel
Save