Description:
save point
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r423:abd08161c89d - - 1 file changed: 13 inserted, 0 deleted
@@ -1,9 +1,22 | |||||
|
1 | class ReportController < ApplicationController |
|
1 | class ReportController < ApplicationController |
|
2 |
|
2 | ||
|
3 | before_filter :admin_authorization, only: [:login_stat,:submission_stat] |
|
3 | before_filter :admin_authorization, only: [:login_stat,:submission_stat] |
|
|
4 | + before_filter(only: :problem_hof) { |c| | ||
|
|
5 | + user = User.find(session[:user_id]) if session[:user_id] | ||
|
|
6 | + if user==nil | ||
|
|
7 | + flash[:notice] = 'You have to login first' | ||
|
|
8 | + redirect_to :controller => 'main', :action => 'login' | ||
|
|
9 | + return false | ||
|
|
10 | + end | ||
|
|
11 | + | ||
|
|
12 | + unless GraderConfiguration["hall_of_fame_available"] | ||
|
|
13 | + flash[:notice] = 'You are not authorized to view the page you requested' | ||
|
|
14 | + redirect_to :controller => 'main', :action => 'login' unless GraderConfiguration[ "hall_of_fame_available" ] | ||
|
|
15 | + end | ||
|
|
16 | + } | ||
|
4 |
|
17 | ||
|
5 | def login_stat |
|
18 | def login_stat |
|
6 | @logins = Array.new |
|
19 | @logins = Array.new |
|
7 |
|
20 | ||
|
8 | date_and_time = '%Y-%m-%d %H:%M' |
|
21 | date_and_time = '%Y-%m-%d %H:%M' |
|
9 | begin |
|
22 | begin |
You need to be logged in to leave comments.
Login now