Description:
fix various bug
(grafted from cb6577a84dff16a5d7ba91166873cc8a2e2a2628)
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r660:241769f05803 - - 3 files changed: 5 inserted, 5 deleted
@@ -518,13 +518,13 | |||
|
518 | 518 | row = Array.new |
|
519 | 519 | sc.each_index do |i| |
|
520 | 520 | if i == 0 |
|
521 | 521 | row << sc[i].login |
|
522 | 522 | row << sc[i].full_name |
|
523 | 523 | row << sc[i].activated |
|
524 |
- row << (sc[i].try(:contest_stat).try(:started_at) |
|
|
524 | + row << (sc[i].try(:contest_stat).try(:started_at).nil? 'no' : 'yes') | |
|
525 | 525 | row << sc[i].contests.collect {|c| c.name}.join(', ') |
|
526 | 526 | else |
|
527 | 527 | row << sc[i][0] |
|
528 | 528 | total += sc[i][0] |
|
529 | 529 | num_passed += 1 if sc[i][1] |
|
530 | 530 | end |
@@ -1,10 +1,10 | |||
|
1 | 1 | %li.list-group-item |
|
2 | 2 | %strong |
|
3 | 3 | = announcement.title |
|
4 | - - if @current_user.admin? | |
|
4 | + - if @current_user and @current_user.admin? | |
|
5 | 5 | = link_to 'Edit', edit_announcement_path(announcement), class: 'btn btn-xs btn-default' |
|
6 | 6 | %small= "(updated #{time_ago_in_words(announcement.updated_at)} ago on #{announcement.updated_at})" |
|
7 | 7 | |
|
8 | 8 | %br |
|
9 | 9 | = markdown(announcement.body) |
|
10 | 10 | :javascript |
@@ -1,19 +1,19 | |||
|
1 | 1 | |
|
2 | 2 | - if submission.nil? |
|
3 | 3 | = "-" |
|
4 | 4 | - else |
|
5 |
- - |
|
|
6 |
- = |
|
|
5 | + - unless submission.graded_at | |
|
6 | + =t 'main.submitted_at' | |
|
7 | 7 | = format_short_time(submission.submitted_at.localtime) |
|
8 | 8 | - else |
|
9 | 9 | %strong= t 'main.graded_at' |
|
10 | 10 | = "#{format_short_time(submission.graded_at.localtime)} " |
|
11 | 11 | %br |
|
12 | 12 | - if GraderConfiguration['ui.show_score'] |
|
13 |
- |
|
|
13 | + =t 'main.score' | |
|
14 | 14 | = "#{(submission.points*100/submission.problem.full_score).to_i} " |
|
15 | 15 | = " [" |
|
16 | 16 | %tt |
|
17 | 17 | = submission.grader_comment |
|
18 | 18 | = "]" |
|
19 | 19 | %br |
You need to be logged in to leave comments.
Login now