Description:
fixed msg grammar git-svn-id: http://theory.cpe.ku.ac.th/grader/web/trunk@293 6386c4cd-e34a-4fa8-8920-d93eb39b512e
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r154:3580f3e3f91b - - 2 files changed: 2 inserted, 2 deleted

@@ -104,49 +104,49
104 104 redirect_to :action => 'list'
105 105 end
106 106 end
107 107
108 108 def compiler_msg
109 109 @submission = Submission.find(params[:id])
110 110 if @submission.user_id == session[:user_id]
111 111 render :action => 'compiler_msg', :layout => 'empty'
112 112 else
113 113 flash[:notice] = 'Error viewing source'
114 114 redirect_to :action => 'list'
115 115 end
116 116 end
117 117
118 118 def submission
119 119 @user = User.find(session[:user_id])
120 120 @problems = Problem.find_available_problems
121 121 if params[:id]==nil
122 122 @problem = nil
123 123 @submissions = nil
124 124 else
125 125 @problem = Problem.find_by_name(params[:id])
126 126 if not @problem.available
127 127 redirect_to :action => 'list'
128 - flash[:notice] = 'Error: submissions for that problem is not available'
128 + flash[:notice] = 'Error: submissions for that problem are not viewable.'
129 129 return
130 130 end
131 131 @submissions = Submission.find_all_by_user_problem(@user.id, @problem.id)
132 132 end
133 133 end
134 134
135 135 def result
136 136 if !Configuration.show_grading_result
137 137 redirect_to :action => 'list' and return
138 138 end
139 139 @user = User.find(session[:user_id])
140 140 @submission = Submission.find(params[:id])
141 141 if @submission.user!=@user
142 142 flash[:notice] = 'You are not allowed to view result of other users.'
143 143 redirect_to :action => 'list' and return
144 144 end
145 145 prepare_grading_result(@submission)
146 146 end
147 147
148 148 def load_output
149 149 if !Configuration.show_grading_result or params[:num]==nil
150 150 redirect_to :action => 'list' and return
151 151 end
152 152 @user = User.find(session[:user_id])
@@ -1,9 +1,9
1 1 class Problem < ActiveRecord::Base
2 2
3 3 belongs_to :description
4 4
5 5 def self.find_available_problems
6 - find(:all, :conditions => {:available => true})
6 + find(:all, :conditions => {:available => true}, :order => "date_added DESC")
7 7 end
8 8
9 9 end
You need to be logged in to leave comments. Login now