# HG changeset patch # User Nattee Niparnan # Date 2016-10-19 10:58:44 # Node ID 9e7635d526643b79324bf53c3b6005a35a3810db # Parent e45cb8bba2133f012f22afbb0d5f0bf01e8943c1 - add compiler comment - fix error when problem is not present (grafted from 5dcd02c21a697ca0a770d0aab8380eacc42eba04) diff --git a/app/views/graders/list.html.haml b/app/views/graders/list.html.haml --- a/app/views/graders/list.html.haml +++ b/app/views/graders/list.html.haml @@ -54,8 +54,8 @@ - @submission.each do |sub| %tr.inactive %td= link_to sub.id, submission_path(sub.id) - %td= link_to sub.try(:user).try(:full_name), stat_user_path(sub.user.id) - %td= link_to sub.try(:problem).try(:full_name), stat_problem_path(sub.problem.id) + %td= ("" unless sub.user) || link_to sub.try(:user).try(:full_name), stat_user_path(sub.user.id) + %td= ("" unless sub.problem) || link_to sub.try(:problem).try(:full_name), stat_problem_path(sub.problem.id) %td= "#{time_ago_in_words(sub.submitted_at)} ago" %td= sub.graded_at ? "#{time_ago_in_words(sub.graded_at)} ago" : " " %td= sub.grader_comment @@ -72,8 +72,8 @@ - @backlog_submission.each do |sub| %tr.inactive %td= link_to sub.id, submission_path(sub.id) - %td= link_to sub.try(:user).try(:full_name), stat_user_path(sub.user.id) - %td= link_to sub.try(:problem).try(:full_name), stat_problem_path(sub.problem.id) + %td= ("" unless sub.user) || link_to sub.try(:user).try(:full_name), stat_user_path(sub.user.id) + %td= ("" unless sub.problem) || link_to sub.try(:problem).try(:full_name), stat_problem_path(sub.problem.id) %td= "#{time_ago_in_words(sub.submitted_at)} ago" %td= sub.graded_at ? "#{time_ago_in_words(sub.graded_at)} ago" : " " %td= sub.grader_comment diff --git a/app/views/submissions/show.html.haml b/app/views/submissions/show.html.haml --- a/app/views/submissions/show.html.haml +++ b/app/views/submissions/show.html.haml @@ -77,6 +77,11 @@ %td.text-right %strong Memory (kb) %td #{@submission.peak_memory} + %tr + %td.text-right + %strong Compiler result + %td + %pre= @submission.compiler_message - if session[:admin] %tr %td.text-right