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

@@ -54,8 +54,8
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
@@ -72,8 +72,8
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
@@ -2,10 +2,15
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')
@@ -6,6 +6,8
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
@@ -81,7 +83,19
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
@@ -84,7 +84,7
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
You need to be logged in to leave comments. Login now