Description:
- fix link to user stat from user admin - add compiler message to submission view - fix some bugs
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r611:5599f91f430d - - 4 files changed: 26 inserted, 7 deleted

@@ -51,14 +51,14
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= ("" 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)
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
@@ -69,14 +69,14
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= ("" 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)
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
@@ -1,14 +1,19
1 1 %header.navbar.navbar-default.navbar-fixed-top
2 2 %nav
3 3 .container-fluid
4 4 .navbar-header
5 + %button.navbar-toggle.collapsed{ data: {toggle: 'collapse', target: '#navbar-collapse'} }
6 + %span.sr-only Togggle Navigation
7 + %span.icon-bar
8 + %span.icon-bar
9 + %span.icon-bar
5 10 %a.navbar-brand{href: main_list_path}
6 11 %span.glyphicon.glyphicon-home
7 12 MAIN
8 - .collapse.navbar-collapse
13 + .collapse.navbar-collapse#navbar-collapse
9 14 %ul.nav.navbar-nav
10 15 - if (@current_user!=nil) and (GraderConfiguration.show_tasks_to?(@current_user))
11 16 //= add_menu("#{I18n.t 'menu.tasks'}", 'tasks', 'list')
12 17 %li.dropdown
13 18 %a.dropdown-toggle{href: '#', data: {toggle:'dropdown'}, aria: {haspopup:"true", expanded:"false"}, role: "button"}
14 19 = "#{I18n.t 'menu.submissions'}"
@@ -3,12 +3,14
3 3 %textarea#data{style: "display:none;"}
4 4 :preserve
5 5 #{@submission.source}
6 6
7 7 //%div.highlight{:style => "border: 1px solid black;"}
8 8 //=@formatted_code.html_safe
9 +
10 +
9 11 .containter
10 12 .row
11 13 .col-md-7
12 14 %h2 Source Code
13 15 .col-md-5
14 16 %h2 Stat
@@ -78,12 +80,24
78 80 %strong Memory (kb)
79 81 %td #{@submission.peak_memory}
80 82 %tr
81 83 %td.text-right
82 84 %strong Compiler result
83 85 %td
84 - %pre= @submission.compiler_message
86 + %button.btn.btn-info.btn-xs{type: 'button', data: {toggle: 'modal', target: '#compiler'}}
87 + view
88 + .modal.fade#compiler{tabindex: -1,role: 'dialog'}
89 + .modal-dialog.modal-lg{role:'document'}
90 + .modal-content
91 + .modal-header
92 + %button.close{type: 'button', data: {dismissed: :modal}, aria: {label: 'close'}}
93 + %span{aria: {hidden: 'true'}, data: {dismiss: 'modal'}} ×
94 + %h4 Compiler message
95 + .modal-body
96 + %pre= @submission.compiler_message
97 + .modal-footer
98 + %button.btn.btn-default{type: 'button', data: {dismiss: 'modal'}} Close
85 99 - if session[:admin]
86 100 %tr
87 101 %td.text-right
88 102 %strong IP
89 103 %td #{@submission.ip_address}
@@ -81,13 +81,13
81 81 %th
82 82 %th
83 83 %th
84 84 %th
85 85 - for user in @users
86 86 %tr
87 - %td= link_to user.login, controller: :users, :action => 'profile', :id => user
87 + %td= link_to user.login, stat_user_path(user)
88 88 %td= user.full_name
89 89 %td= user.email
90 90 %td= user.remark
91 91 %td= toggle_button(user.activated?, toggle_activate_user_path(user),"toggle_activate_user_#{user.id}")
92 92 %td= toggle_button(user.enabled?, toggle_enable_user_path(user),"toggle_enable_user_#{user.id}")
93 93 %td= user.last_ip
You need to be logged in to leave comments. Login now