# HG changeset patch # User jittat # Date 2008-11-15 17:32:50 # Node ID 3580f3e3f91b3d08c0d5c6cae4621e10183f57cd # Parent 15e1ee6d602b22065556c0c9bcdfe2ea9f88855f fixed msg grammar git-svn-id: http://theory.cpe.ku.ac.th/grader/web/trunk@293 6386c4cd-e34a-4fa8-8920-d93eb39b512e diff --git a/app/controllers/main_controller.rb b/app/controllers/main_controller.rb --- a/app/controllers/main_controller.rb +++ b/app/controllers/main_controller.rb @@ -125,7 +125,7 @@ @problem = Problem.find_by_name(params[:id]) if not @problem.available redirect_to :action => 'list' - flash[:notice] = 'Error: submissions for that problem is not available' + flash[:notice] = 'Error: submissions for that problem are not viewable.' return end @submissions = Submission.find_all_by_user_problem(@user.id, @problem.id) diff --git a/app/models/problem.rb b/app/models/problem.rb --- a/app/models/problem.rb +++ b/app/models/problem.rb @@ -3,7 +3,7 @@ belongs_to :description def self.find_available_problems - find(:all, :conditions => {:available => true}) + find(:all, :conditions => {:available => true}, :order => "date_added DESC") end end