Description:
- add compiler comment
- fix error when problem is not present
(grafted from 5dcd02c21a697ca0a770d0aab8380eacc42eba04)
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r659:9e7635d52664 - - 2 files changed: 9 inserted, 4 deleted
@@ -45,38 +45,38 | |||||
|
45 | %table.table.table-striped.table-condensed |
|
45 | %table.table.table-striped.table-condensed |
|
46 | %thead |
|
46 | %thead |
|
47 | %th ID |
|
47 | %th ID |
|
48 | %th User |
|
48 | %th User |
|
49 | %th Problem |
|
49 | %th Problem |
|
50 | %th Submitted |
|
50 | %th Submitted |
|
51 | %th Graded |
|
51 | %th Graded |
|
52 | %th Result |
|
52 | %th Result |
|
53 | %tbody |
|
53 | %tbody |
|
54 | - @submission.each do |sub| |
|
54 | - @submission.each do |sub| |
|
55 | %tr.inactive |
|
55 | %tr.inactive |
|
56 | %td= link_to sub.id, submission_path(sub.id) |
|
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) |
|
57 | + %td= ("" unless sub.user) || 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) |
|
58 | + %td= ("" unless sub.problem) || link_to sub.try(:problem).try(:full_name), stat_problem_path(sub.problem.id) |
|
59 | %td= "#{time_ago_in_words(sub.submitted_at)} ago" |
|
59 | %td= "#{time_ago_in_words(sub.submitted_at)} ago" |
|
60 | %td= sub.graded_at ? "#{time_ago_in_words(sub.graded_at)} ago" : " " |
|
60 | %td= sub.graded_at ? "#{time_ago_in_words(sub.graded_at)} ago" : " " |
|
61 | %td= sub.grader_comment |
|
61 | %td= sub.grader_comment |
|
62 | %h2 Ungraded submission |
|
62 | %h2 Ungraded submission |
|
63 | %table.table.table-striped.table-condensed |
|
63 | %table.table.table-striped.table-condensed |
|
64 | %thead |
|
64 | %thead |
|
65 | %th ID |
|
65 | %th ID |
|
66 | %th User |
|
66 | %th User |
|
67 | %th Problem |
|
67 | %th Problem |
|
68 | %th Submitted |
|
68 | %th Submitted |
|
69 | %th Graded |
|
69 | %th Graded |
|
70 | %th Result |
|
70 | %th Result |
|
71 | %tbody |
|
71 | %tbody |
|
72 | - @backlog_submission.each do |sub| |
|
72 | - @backlog_submission.each do |sub| |
|
73 | %tr.inactive |
|
73 | %tr.inactive |
|
74 | %td= link_to sub.id, submission_path(sub.id) |
|
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) |
|
75 | + %td= ("" unless sub.user) || 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) |
|
76 | + %td= ("" unless sub.problem) || link_to sub.try(:problem).try(:full_name), stat_problem_path(sub.problem.id) |
|
77 | %td= "#{time_ago_in_words(sub.submitted_at)} ago" |
|
77 | %td= "#{time_ago_in_words(sub.submitted_at)} ago" |
|
78 | %td= sub.graded_at ? "#{time_ago_in_words(sub.graded_at)} ago" : " " |
|
78 | %td= sub.graded_at ? "#{time_ago_in_words(sub.graded_at)} ago" : " " |
|
79 | %td= sub.grader_comment |
|
79 | %td= sub.grader_comment |
|
80 |
|
80 | ||
|
81 |
|
81 | ||
|
82 |
|
82 |
@@ -68,17 +68,22 | |||||
|
68 | %tr |
|
68 | %tr |
|
69 | %td.text-right |
|
69 | %td.text-right |
|
70 | %strong Comment |
|
70 | %strong Comment |
|
71 | %td #{@submission.grader_comment} |
|
71 | %td #{@submission.grader_comment} |
|
72 | %tr |
|
72 | %tr |
|
73 | %td.text-right |
|
73 | %td.text-right |
|
74 | %strong Runtime (s) |
|
74 | %strong Runtime (s) |
|
75 | %td #{@submission.max_runtime} |
|
75 | %td #{@submission.max_runtime} |
|
76 | %tr |
|
76 | %tr |
|
77 | %td.text-right |
|
77 | %td.text-right |
|
78 | %strong Memory (kb) |
|
78 | %strong Memory (kb) |
|
79 | %td #{@submission.peak_memory} |
|
79 | %td #{@submission.peak_memory} |
|
|
80 | + %tr | ||
|
|
81 | + %td.text-right | ||
|
|
82 | + %strong Compiler result | ||
|
|
83 | + %td | ||
|
|
84 | + %pre= @submission.compiler_message | ||
|
80 | - if session[:admin] |
|
85 | - if session[:admin] |
|
81 | %tr |
|
86 | %tr |
|
82 | %td.text-right |
|
87 | %td.text-right |
|
83 | %strong IP |
|
88 | %strong IP |
|
84 | %td #{@submission.ip_address} |
|
89 | %td #{@submission.ip_address} |
You need to be logged in to leave comments.
Login now