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

@@ -9,74 +9,74
9 .panel.panel-primary
9 .panel.panel-primary
10 .panel-heading
10 .panel-heading
11 Grader control:
11 Grader control:
12 .panel-body
12 .panel-body
13 =link_to 'Start Graders in grading env', { action: 'start_grading'}, class: 'btn btn-default', method: 'post'
13 =link_to 'Start Graders in grading env', { action: 'start_grading'}, class: 'btn btn-default', method: 'post'
14 =link_to 'Start Graders in exam env', { action: 'start_exam'}, class: 'btn btn-default', method: 'post'
14 =link_to 'Start Graders in exam env', { action: 'start_exam'}, class: 'btn btn-default', method: 'post'
15 =link_to 'Stop all running Graders', { action: 'stop_all'}, class: 'btn btn-default', method: 'post'
15 =link_to 'Stop all running Graders', { action: 'stop_all'}, class: 'btn btn-default', method: 'post'
16 =link_to 'Clear all data', { action: 'clear_all'}, class: 'btn btn-default', method: 'post'
16 =link_to 'Clear all data', { action: 'clear_all'}, class: 'btn btn-default', method: 'post'
17
17
18 .row
18 .row
19 .col-md-6
19 .col-md-6
20 - if @last_task
20 - if @last_task
21 Last task:
21 Last task:
22 = link_to "#{@last_task.id}", :action => 'view', :id => @last_task.id, :type => 'Task'
22 = link_to "#{@last_task.id}", :action => 'view', :id => @last_task.id, :type => 'Task'
23
23
24 %br/
24 %br/
25
25
26 - if @last_test_request
26 - if @last_test_request
27 Last test_request:
27 Last test_request:
28 = link_to "#{@last_test_request.id}", :action => 'view', :id => @last_test_request.id, :type => 'TestRequest'
28 = link_to "#{@last_test_request.id}", :action => 'view', :id => @last_test_request.id, :type => 'TestRequest'
29
29
30 %h2 Current graders
30 %h2 Current graders
31
31
32 = render :partial => 'grader_list', :locals => {:grader_list => @grader_processes}
32 = render :partial => 'grader_list', :locals => {:grader_list => @grader_processes}
33
33
34 %h2 Stalled graders
34 %h2 Stalled graders
35
35
36 = render :partial => 'grader_list', :locals => {:grader_list => @stalled_processes}
36 = render :partial => 'grader_list', :locals => {:grader_list => @stalled_processes}
37
37
38 %h2 Terminated graders
38 %h2 Terminated graders
39
39
40 %p= link_to 'Clear data for terminated graders', { action: 'clear_terminated'}, class: 'btn btn-default', method: 'post'
40 %p= link_to 'Clear data for terminated graders', { action: 'clear_terminated'}, class: 'btn btn-default', method: 'post'
41
41
42 = render :partial => 'grader_list', :locals => {:grader_list => @terminated_processes}
42 = render :partial => 'grader_list', :locals => {:grader_list => @terminated_processes}
43 .col-md-6
43 .col-md-6
44 %h2 Last 20 submissions
44 %h2 Last 20 submissions
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
@@ -32,53 +32,58
32 = link_to "#{@submission.user.login}", stat_user_path(@submission.user)
32 = link_to "#{@submission.user.login}", stat_user_path(@submission.user)
33 = @submission.user.full_name
33 = @submission.user.full_name
34 - else
34 - else
35 = "(n/a)"
35 = "(n/a)"
36 %tr
36 %tr
37 %td.text-right
37 %td.text-right
38 %strong Task
38 %strong Task
39 %td
39 %td
40 - if @submission.problem!=nil
40 - if @submission.problem!=nil
41 = link_to "[#{@submission.problem.name}]", stat_problem_path(@submission.problem)
41 = link_to "[#{@submission.problem.name}]", stat_problem_path(@submission.problem)
42 = @submission.problem.full_name
42 = @submission.problem.full_name
43 - else
43 - else
44 = "(n/a)"
44 = "(n/a)"
45 %tr
45 %tr
46 %td.text-right
46 %td.text-right
47 %strong Tries
47 %strong Tries
48 %td= @submission.number
48 %td= @submission.number
49 %tr
49 %tr
50 %td.text-right
50 %td.text-right
51 %strong Language
51 %strong Language
52 %td= @submission.language.pretty_name
52 %td= @submission.language.pretty_name
53 %tr
53 %tr
54 %td.text-right
54 %td.text-right
55 %strong Submitted
55 %strong Submitted
56 %td #{time_ago_in_words(@submission.submitted_at)} ago (at #{@submission.submitted_at.to_formatted_s(:long)})
56 %td #{time_ago_in_words(@submission.submitted_at)} ago (at #{@submission.submitted_at.to_formatted_s(:long)})
57 %tr
57 %tr
58 %td.text-right
58 %td.text-right
59 %strong Graded
59 %strong Graded
60 - if @submission.graded_at
60 - if @submission.graded_at
61 %td #{time_ago_in_words(@submission.graded_at)} ago (at #{@submission.graded_at.to_formatted_s(:long)})
61 %td #{time_ago_in_words(@submission.graded_at)} ago (at #{@submission.graded_at.to_formatted_s(:long)})
62 - else
62 - else
63 %td -
63 %td -
64 %tr
64 %tr
65 %td.text-right
65 %td.text-right
66 %strong Points
66 %strong Points
67 %td #{@submission.points}/#{@submission.problem.full_score}
67 %td #{@submission.points}/#{@submission.problem.full_score}
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