Description:
fix show submission where problem is nil
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r646:43781dd1b0bd - - 1 file changed: 1 inserted, 1 deleted
@@ -45,49 +45,49 | |||
|
45 | 45 | - else |
|
46 | 46 | = "(n/a)" |
|
47 | 47 | %tr |
|
48 | 48 | %td.text-right |
|
49 | 49 | %strong Tries |
|
50 | 50 | %td= @submission.number |
|
51 | 51 | %tr |
|
52 | 52 | %td.text-right |
|
53 | 53 | %strong Language |
|
54 | 54 | %td= @submission.language.pretty_name |
|
55 | 55 | %tr |
|
56 | 56 | %td.text-right |
|
57 | 57 | %strong Submitted |
|
58 | 58 | %td #{time_ago_in_words(@submission.submitted_at)} ago (at #{@submission.submitted_at.to_formatted_s(:long)}) |
|
59 | 59 | %tr |
|
60 | 60 | %td.text-right |
|
61 | 61 | %strong Graded |
|
62 | 62 | - if @submission.graded_at |
|
63 | 63 | %td #{time_ago_in_words(@submission.graded_at)} ago (at #{@submission.graded_at.to_formatted_s(:long)}) |
|
64 | 64 | - else |
|
65 | 65 | %td - |
|
66 | 66 | %tr |
|
67 | 67 | %td.text-right |
|
68 | 68 | %strong Points |
|
69 | - %td #{@submission.points}/#{@submission.problem.full_score} | |
|
69 | + %td #{@submission.points}/#{@submission.try(:problem).try(:full_score)} | |
|
70 | 70 | %tr |
|
71 | 71 | %td.text-right |
|
72 | 72 | %strong Comment |
|
73 | 73 | %td #{@submission.grader_comment} |
|
74 | 74 | %tr |
|
75 | 75 | %td.text-right |
|
76 | 76 | %strong Runtime (s) |
|
77 | 77 | %td #{@submission.max_runtime} |
|
78 | 78 | %tr |
|
79 | 79 | %td.text-right |
|
80 | 80 | %strong Memory (kb) |
|
81 | 81 | %td #{@submission.peak_memory} |
|
82 | 82 | %tr |
|
83 | 83 | %td.text-right |
|
84 | 84 | %strong Compiler result |
|
85 | 85 | %td |
|
86 | 86 | %button.btn.btn-info.btn-xs{type: 'button', data: {toggle: 'modal', target: '#compiler'}} |
|
87 | 87 | view |
|
88 | 88 | - if session[:admin] |
|
89 | 89 | %tr |
|
90 | 90 | %td.text-right |
|
91 | 91 | %strong IP |
|
92 | 92 | %td #{@submission.ip_address} |
|
93 | 93 | %tr |
You need to be logged in to leave comments.
Login now