diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index 0a3c61c90..1a561006a 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -107,7 +107,7 @@ class CoursesController < ApplicationController courses = Course.visible @courses = paginateHelper courses,10 else - courses = Course.visible.where("LOWER(name) like '%#{params[:name].to_s.downcase}%'") + courses = Course.visible.where("LOWER(name) like '%#{params[:name].to_s.downcase}%'").order("time desc, created_at desc") @courses = paginateHelper courses,10 end @name = params[:name]