Description:
fix various bug (grafted from cb6577a84dff16a5d7ba91166873cc8a2e2a2628)
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r660:241769f05803 - - 3 files changed: 4 inserted, 4 deleted

@@ -512,25 +512,25
512 problem.each { |p| header << p.name }
512 problem.each { |p| header << p.name }
513 header += ['Total','Passed']
513 header += ['Total','Passed']
514 csv << header
514 csv << header
515 #add data
515 #add data
516 scorearray.each do |sc|
516 scorearray.each do |sc|
517 total = num_passed = 0
517 total = num_passed = 0
518 row = Array.new
518 row = Array.new
519 sc.each_index do |i|
519 sc.each_index do |i|
520 if i == 0
520 if i == 0
521 row << sc[i].login
521 row << sc[i].login
522 row << sc[i].full_name
522 row << sc[i].full_name
523 row << sc[i].activated
523 row << sc[i].activated
524 - row << (sc[i].try(:contest_stat).try(:started_at)!=nil ? 'yes' : 'no')
524 + row << (sc[i].try(:contest_stat).try(:started_at).nil? 'no' : 'yes')
525 row << sc[i].contests.collect {|c| c.name}.join(', ')
525 row << sc[i].contests.collect {|c| c.name}.join(', ')
526 else
526 else
527 row << sc[i][0]
527 row << sc[i][0]
528 total += sc[i][0]
528 total += sc[i][0]
529 num_passed += 1 if sc[i][1]
529 num_passed += 1 if sc[i][1]
530 end
530 end
531 end
531 end
532 row << total
532 row << total
533 row << num_passed
533 row << num_passed
534 csv << row
534 csv << row
535 end
535 end
536 end
536 end
@@ -1,15 +1,15
1 %li.list-group-item
1 %li.list-group-item
2 %strong
2 %strong
3 = announcement.title
3 = announcement.title
4 - - if @current_user.admin?
4 + - if @current_user and @current_user.admin?
5 = link_to 'Edit', edit_announcement_path(announcement), class: 'btn btn-xs btn-default'
5 = link_to 'Edit', edit_announcement_path(announcement), class: 'btn btn-xs btn-default'
6 %small= "(updated #{time_ago_in_words(announcement.updated_at)} ago on #{announcement.updated_at})"
6 %small= "(updated #{time_ago_in_words(announcement.updated_at)} ago on #{announcement.updated_at})"
7
7
8 %br
8 %br
9 = markdown(announcement.body)
9 = markdown(announcement.body)
10 :javascript
10 :javascript
11 Announcement.updateRecentId(#{announcement.id});
11 Announcement.updateRecentId(#{announcement.id});
12 - if (defined? announcement_effect) and announcement_effect
12 - if (defined? announcement_effect) and announcement_effect
13 :javascript
13 :javascript
14 $("announcement-#{announcement.id}").blindDown({duration: 0.2});
14 $("announcement-#{announcement.id}").blindDown({duration: 0.2});
15 $("announcement-#{announcement.id}").appear({duration: 0.5, queue: 'end'});
15 $("announcement-#{announcement.id}").appear({duration: 0.5, queue: 'end'});
@@ -1,25 +1,25
1
1
2 - if submission.nil?
2 - if submission.nil?
3 = "-"
3 = "-"
4 - else
4 - else
5 - - if submission.graded_at.nil?
5 + - unless submission.graded_at
6 = t 'main.submitted_at'
6 =t 'main.submitted_at'
7 = format_short_time(submission.submitted_at.localtime)
7 = format_short_time(submission.submitted_at.localtime)
8 - else
8 - else
9 %strong= t 'main.graded_at'
9 %strong= t 'main.graded_at'
10 = "#{format_short_time(submission.graded_at.localtime)} "
10 = "#{format_short_time(submission.graded_at.localtime)} "
11 %br
11 %br
12 - if GraderConfiguration['ui.show_score']
12 - if GraderConfiguration['ui.show_score']
13 - %strong= t 'main.score'
13 + =t 'main.score'
14 = "#{(submission.points*100/submission.problem.full_score).to_i} "
14 = "#{(submission.points*100/submission.problem.full_score).to_i} "
15 = " ["
15 = " ["
16 %tt
16 %tt
17 = submission.grader_comment
17 = submission.grader_comment
18 = "]"
18 = "]"
19 %br
19 %br
20 %strong View:
20 %strong View:
21 - if GraderConfiguration.show_grading_result
21 - if GraderConfiguration.show_grading_result
22 = link_to '[detailed result]', :action => 'result', :id => submission.id
22 = link_to '[detailed result]', :action => 'result', :id => submission.id
23 = link_to "#{t 'main.cmp_msg'}", {:action => 'compiler_msg', :id => submission.id}, {popup: true,class: 'btn btn-xs btn-info'}
23 = link_to "#{t 'main.cmp_msg'}", {:action => 'compiler_msg', :id => submission.id}, {popup: true,class: 'btn btn-xs btn-info'}
24 = link_to "#{t 'main.src_link'}",{:action => 'source', :id => submission.id}, class: 'btn btn-xs btn-info'
24 = link_to "#{t 'main.src_link'}",{:action => 'source', :id => submission.id}, class: 'btn btn-xs btn-info'
25 = link_to "#{t 'main.submissions_link'}", problem_submissions_path(problem_id), class: 'btn btn-xs btn-info'
25 = link_to "#{t 'main.submissions_link'}", problem_submissions_path(problem_id), class: 'btn btn-xs btn-info'
You need to be logged in to leave comments. Login now