Description:
add 2nd level sort problem by name (not full name)
show problem name before full_name in main/list
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r409:4e03b3c502cc - - 2 files changed: 2 inserted, 2 deleted
@@ -11,13 +11,13 | |||||
|
11 | scope :available, :conditions => {:available => true} |
|
11 | scope :available, :conditions => {:available => true} |
|
12 |
|
12 | ||
|
13 | DEFAULT_TIME_LIMIT = 1 |
|
13 | DEFAULT_TIME_LIMIT = 1 |
|
14 | DEFAULT_MEMORY_LIMIT = 32 |
|
14 | DEFAULT_MEMORY_LIMIT = 32 |
|
15 |
|
15 | ||
|
16 | def self.find_available_problems |
|
16 | def self.find_available_problems |
|
17 | - Problem.available.all(:order => "date_added DESC") |
|
17 | + Problem.available.all(:order => "date_added DESC, name ASC") |
|
18 | end |
|
18 | end |
|
19 |
|
19 | ||
|
20 | def self.create_from_import_form_params(params, old_problem=nil) |
|
20 | def self.create_from_import_form_params(params, old_problem=nil) |
|
21 | org_problem = old_problem || Problem.new |
|
21 | org_problem = old_problem || Problem.new |
|
22 | import_params, problem = Problem.extract_params_and_check(params, |
|
22 | import_params, problem = Problem.extract_params_and_check(params, |
|
23 | org_problem) |
|
23 | org_problem) |
@@ -1,12 +1,12 | |||||
|
1 | <tr class="info-<%= (problem_counter%2==0) ? "even" : "odd" %>"> |
|
1 | <tr class="info-<%= (problem_counter%2==0) ? "even" : "odd" %>"> |
|
2 | <td> |
|
2 | <td> |
|
3 | <%= "#{problem_counter+1}" %> |
|
3 | <%= "#{problem_counter+1}" %> |
|
4 | </td> |
|
4 | </td> |
|
5 | <td> |
|
5 | <td> |
|
6 |
- <%= "#{problem.full_name} |
|
6 | + <%= "(#{problem.name}) #{problem.full_name}" %> |
|
7 | <%= link_to_description_if_any "[#{t 'main.problem_desc'}]", problem %> |
|
7 | <%= link_to_description_if_any "[#{t 'main.problem_desc'}]", problem %> |
|
8 | </td> |
|
8 | </td> |
|
9 | <td align="center"> |
|
9 | <td align="center"> |
|
10 | <%= @prob_submissions[problem.id][:count] %> |
|
10 | <%= @prob_submissions[problem.id][:count] %> |
|
11 | </td> |
|
11 | </td> |
|
12 | <td> |
|
12 | <td> |
You need to be logged in to leave comments.
Login now