|
|
:css
|
|
|
.fix-width {
|
|
|
font-family: "Consolas, Monaco, Droid Sans Mono,Mono, Monospace,Courier"
|
|
|
}
|
|
|
|
|
|
%h1 Problem stat: #{@problem.name}
|
|
|
%h2 Overview
|
|
|
|
|
|
.row
|
|
|
.col-md-2
|
|
|
%strong Name:
|
|
|
.col-md-10
|
|
|
= @problem.full_name #in_place_editor_field :problem, :full_name, {}, :rows=>1
|
|
|
= link_to_description_if_any "[#{t 'main.problem_desc'}] <span class='glyphicon glyphicon-file'></span>".html_safe, @problem
|
|
|
.row
|
|
|
.col-md-2.strong
|
|
|
%strong Submissions:
|
|
|
.col-md-10
|
|
|
= @submissions.count
|
|
|
.row
|
|
|
.col-md-2.strong
|
|
|
%strong Solved/Attemped User
|
|
|
.col-md-10
|
|
|
#{@summary[:solve]}/#{@summary[:attempt]} (#{(@summary[:solve]*100.0/@summary[:attempt]).round(1)}%)
|
|
|
|
|
|
|
|
|
%h2 Submissions Count
|
|
|
= render partial: 'application/bar_graph', locals: { histogram: @histogram }
|
|
|
|
|
|
%h2 Submissions
|
|
|
- if @submissions and @submissions.count > 0
|
|
|
%table#main_table.table.table-condensed.table-striped
|
|
|
%thead
|
|
|
%tr
|
|
|
%th ID
|
|
|
%th Login
|
|
|
%th Name
|
|
|
%th Submitted_at
|
|
|
%th language
|
|
|
%th Points
|
|
|
%th comment
|
|
|
%th IP
|
|
|
%tbody
|
|
|
- row_odd,curr = true,''
|
|
|
- @submissions.each do |sub|
|
|
|
- next unless sub.user
|
|
|
- row_odd,curr = !row_odd, sub.user if curr != sub.user
|
|
|
%tr
|
|
|
%td= link_to sub.id, submission_path(sub)
|
|
|
%td= link_to sub.user.login, stat_user_path(sub.user)
|
|
|
%td= sub.user.full_name
|
|
|
%td{data: {order: sub.submitted_at}}= time_ago_in_words(sub.submitted_at) + " ago"
|
|
|
%td= sub.language.name
|
|
|
%td= sub.points
|
|
|
%td.fix-width= sub.grader_comment
|
|
|
%td= sub.ip_address
|
|
|
- else
|
|
|
No submission
|
|
|
|
|
|
:javascript
|
|
|
$("#main_table").DataTable({
|
|
|
paging: false
|
|
|
});
|
|
|
|