@ -207,8 +207,7 @@ class FilesController < ApplicationController
sort="created_on DESC"
sort="created_on DESC"
end
end
ifkeywords!="%%"
ifkeywords!="%%"
resultSet=Attachment.where("attachments.container_type = 'Course' And attachments.container_id = '#{course.id}' AND filename LIKE :like ",like:"%#{keywords}%").
resultSet=Attachment.where("attachments.container_type = 'Course' And attachments.container_id = '#{course.id}' AND filename LIKE :like ",like:"%#{keywords}%").reorder(sort)
reorder(sort)
else
else
resultSet=Attachment.where("attachments.container_type = 'Course' And attachments.container_id = '#{course.id}' ").reorder(sort)
resultSet=Attachment.where("attachments.container_type = 'Course' And attachments.container_id = '#{course.id}' ").reorder(sort)