Description:
- add compiler comment - fix error when problem is not present (grafted from 5dcd02c21a697ca0a770d0aab8380eacc42eba04)
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r659:9e7635d52664 - - 2 files changed: 9 inserted, 4 deleted

@@ -33,50 +33,50
33 33
34 34 %h2 Stalled graders
35 35
36 36 = render :partial => 'grader_list', :locals => {:grader_list => @stalled_processes}
37 37
38 38 %h2 Terminated graders
39 39
40 40 %p= link_to 'Clear data for terminated graders', { action: 'clear_terminated'}, class: 'btn btn-default', method: 'post'
41 41
42 42 = render :partial => 'grader_list', :locals => {:grader_list => @terminated_processes}
43 43 .col-md-6
44 44 %h2 Last 20 submissions
45 45 %table.table.table-striped.table-condensed
46 46 %thead
47 47 %th ID
48 48 %th User
49 49 %th Problem
50 50 %th Submitted
51 51 %th Graded
52 52 %th Result
53 53 %tbody
54 54 - @submission.each do |sub|
55 55 %tr.inactive
56 56 %td= link_to sub.id, submission_path(sub.id)
57 - %td= link_to sub.try(:user).try(:full_name), stat_user_path(sub.user.id)
58 - %td= link_to sub.try(:problem).try(:full_name), stat_problem_path(sub.problem.id)
57 + %td= ("" unless sub.user) || link_to sub.try(:user).try(:full_name), stat_user_path(sub.user.id)
58 + %td= ("" unless sub.problem) || link_to sub.try(:problem).try(:full_name), stat_problem_path(sub.problem.id)
59 59 %td= "#{time_ago_in_words(sub.submitted_at)} ago"
60 60 %td= sub.graded_at ? "#{time_ago_in_words(sub.graded_at)} ago" : " "
61 61 %td= sub.grader_comment
62 62 %h2 Ungraded submission
63 63 %table.table.table-striped.table-condensed
64 64 %thead
65 65 %th ID
66 66 %th User
67 67 %th Problem
68 68 %th Submitted
69 69 %th Graded
70 70 %th Result
71 71 %tbody
72 72 - @backlog_submission.each do |sub|
73 73 %tr.inactive
74 74 %td= link_to sub.id, submission_path(sub.id)
75 - %td= link_to sub.try(:user).try(:full_name), stat_user_path(sub.user.id)
76 - %td= link_to sub.try(:problem).try(:full_name), stat_problem_path(sub.problem.id)
75 + %td= ("" unless sub.user) || link_to sub.try(:user).try(:full_name), stat_user_path(sub.user.id)
76 + %td= ("" unless sub.problem) || link_to sub.try(:problem).try(:full_name), stat_problem_path(sub.problem.id)
77 77 %td= "#{time_ago_in_words(sub.submitted_at)} ago"
78 78 %td= sub.graded_at ? "#{time_ago_in_words(sub.graded_at)} ago" : " "
79 79 %td= sub.grader_comment
80 80
81 81
82 82
@@ -56,29 +56,34
56 56 %td #{time_ago_in_words(@submission.submitted_at)} ago (at #{@submission.submitted_at.to_formatted_s(:long)})
57 57 %tr
58 58 %td.text-right
59 59 %strong Graded
60 60 - if @submission.graded_at
61 61 %td #{time_ago_in_words(@submission.graded_at)} ago (at #{@submission.graded_at.to_formatted_s(:long)})
62 62 - else
63 63 %td -
64 64 %tr
65 65 %td.text-right
66 66 %strong Points
67 67 %td #{@submission.points}/#{@submission.problem.full_score}
68 68 %tr
69 69 %td.text-right
70 70 %strong Comment
71 71 %td #{@submission.grader_comment}
72 72 %tr
73 73 %td.text-right
74 74 %strong Runtime (s)
75 75 %td #{@submission.max_runtime}
76 76 %tr
77 77 %td.text-right
78 78 %strong Memory (kb)
79 79 %td #{@submission.peak_memory}
80 + %tr
81 + %td.text-right
82 + %strong Compiler result
83 + %td
84 + %pre= @submission.compiler_message
80 85 - if session[:admin]
81 86 %tr
82 87 %td.text-right
83 88 %strong IP
84 89 %td #{@submission.ip_address}
You need to be logged in to leave comments. Login now