Show More
Commit Description:
add more stat
Commit Description:
add more stat
References:
File last commit:
Show/Diff file:
Action:
app/views/users/profile.html.haml | 66 lines | 1.6 KiB | text/x-haml | HamlLexer |
add user profile page listing all submission, permission is by 'right.user_view_submission'...
r431 - content_for :header do
add jquery to manage problem, now we can select a range of problem
r456 = javascript_include_tag 'local_jquery'
add user profile page listing all submission, permission is by 'right.user_view_submission'...
r431
add more stat
r458 :javascript
add user profile page listing all submission, permission is by 'right.user_view_submission'...
r431 $(function () {
add more stat
r458 $('#submission_table').tablesorter({widgets: ['zebra']});
add user profile page listing all submission, permission is by 'right.user_view_submission'...
r431 });
fix profile issue when problem is null
r434 :css
.fix-width {
font-family: Droid Sans Mono,Consolas, monospace, mono, Courier New, Courier;
}
add more stat
r458 %h1= @user.full_name
add user profile page listing all submission, permission is by 'right.user_view_submission'...
r431
<b>Login:</b> #{@user.login} <br/>
<b>Full name:</b> #{@user.full_name} <br />
%h2 Problem Stat
add more stat
r458 %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)}%)
add user profile page listing all submission, permission is by 'right.user_view_submission'...
r431
add more stat
r458 %h2 Submission History
=render partial: 'application/bar_graph', locals: {histogram: @histogram, param: {bar_width: 7}}
add user profile page listing all submission, permission is by 'right.user_view_submission'...
r431
%table.tablesorter-cafe#submission_table
%thead
%tr
%th ID
%th Problem code
update user profile and user list
r450 %th Problem full name
add user profile page listing all submission, permission is by 'right.user_view_submission'...
r431 %th Language
update user profile and user list
r450 %th Submitted at
add user profile page listing all submission, permission is by 'right.user_view_submission'...
r431 %th Result
%th Score
add ip to submission
r446 - if session[:admin]
%th IP
add user profile page listing all submission, permission is by 'right.user_view_submission'...
r431 %tbody
- @submission.each do |s|
fix profile issue when problem is null
r434 - next unless s.problem
add user profile page listing all submission, permission is by 'right.user_view_submission'...
r431 %tr
%td= link_to "#{s.id}", controller: "graders", action: "submission", id: s.id
%td= s.problem.name
%td= s.problem.full_name
%td= s.language.pretty_name
update user profile and user list
r450 %td #{s.submitted_at.strftime('%Y-%m-%d %H:%M')} (#{time_ago_in_words(s.submitted_at)} ago)
fix profile issue when problem is null
r434 %td.fix-width= s.grader_comment
fix full score
r444 %td= (s.points*100)/s.problem.full_score
add ip to submission
r446 - if session[:admin]
%td= s.ip_address
add user profile page listing all submission, permission is by 'right.user_view_submission'...
r431