Description:
removed admin from score board
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r256:7dba57af2448 - - 1 file changed: 1 inserted, 1 deleted
@@ -2,25 +2,25 | |||||
|
2 |
|
2 | ||
|
3 | def index |
|
3 | def index |
|
4 | if not SHOW_CONTEST_STATUS |
|
4 | if not SHOW_CONTEST_STATUS |
|
5 | render :status => 403 and return |
|
5 | render :status => 403 and return |
|
6 | end |
|
6 | end |
|
7 |
|
7 | ||
|
8 | problem_count = Problem.available_problem_count |
|
8 | problem_count = Problem.available_problem_count |
|
9 |
|
9 | ||
|
10 | @dead_users = [] |
|
10 | @dead_users = [] |
|
11 | @level_users = {} |
|
11 | @level_users = {} |
|
12 | @levels = (0..CODEJOM_MAX_ALIVE_LEVEL) |
|
12 | @levels = (0..CODEJOM_MAX_ALIVE_LEVEL) |
|
13 | @levels.each { |l| @level_users[l] = [] } |
|
13 | @levels.each { |l| @level_users[l] = [] } |
|
14 | - User.find(:all).each do |user| |
|
14 | + User.find(:all).find_all{|user| not user.admin? }.each do |user| |
|
15 | if user.codejom_status==nil |
|
15 | if user.codejom_status==nil |
|
16 | user.update_codejom_status |
|
16 | user.update_codejom_status |
|
17 | user.codejom_status(true) # reload |
|
17 | user.codejom_status(true) # reload |
|
18 | end |
|
18 | end |
|
19 |
|
19 | ||
|
20 | if not user.codejom_status.alive |
|
20 | if not user.codejom_status.alive |
|
21 | @dead_users << user |
|
21 | @dead_users << user |
|
22 | else |
|
22 | else |
|
23 | @level_users[user.codejom_level] << user |
|
23 | @level_users[user.codejom_level] << user |
|
24 | end |
|
24 | end |
|
25 | end |
|
25 | end |
|
26 |
|
26 |
You need to be logged in to leave comments.
Login now