Show More
Commit Description:
rename submission_view_log class...
Commit Description:
rename submission_view_log class don't log when admin is viewing
References:
File last commit:
Show/Diff file:
Action:
app/views/users/profile.html.haml | 66 lines | 1.7 KiB | text/x-haml | HamlLexer |
- content_for :header do
= javascript_include_tag 'local_jquery'
:javascript
$(function () {
$('#submission_table').tablesorter({widgets: ['zebra']});
});
:css
.fix-width {
font-family: Droid Sans Mono,Consolas, monospace, mono, Courier New, Courier;
}
%h1= @user.full_name
<b>Login:</b> #{@user.login} <br/>
<b>Full name:</b> #{@user.full_name} <br />
%h2 Problem Stat
%table.info
%thead
%tr.info-head
%th Stat
%th Value
%tbody
%tr{class: cycle('info-even','info-odd')}
%td.info_param Submissions
%td= @summary[:count]
%tr{class: cycle('info-even','info-odd')}
%td.info_param Solved/Attempted Problem
%td #{@summary[:solve]}/#{@summary[:attempt]} (#{(@summary[:solve]*100.0/@summary[:attempt]).round(1)}%)
%h2 Submission History
=render partial: 'application/bar_graph', locals: {histogram: @histogram, param: {bar_width: 7}}
%table.tablesorter-cafe#submission_table
%thead
%tr
%th ID
%th Problem code
%th Problem full name
%th Language
%th Submitted at
%th Result
%th Score
- if session[:admin]
%th IP
%tbody
- @submission.each do |s|
- next unless s.problem
%tr
%td= link_to "#{s.id}", controller: "graders", action: "submission", id: s.id
%td= link_to s.problem.name, controller: "problems", action: "stat", id: s.problem
%td= s.problem.full_name
%td= s.language.pretty_name
%td #{s.submitted_at.strftime('%Y-%m-%d %H:%M')} (#{time_ago_in_words(s.submitted_at)} ago)
%td.fix-width= s.grader_comment
%td= (s.points*100)/s.problem.full_score
- if session[:admin]
%td= s.ip_address