# HG changeset patch # User Nattee Niparnan # Date 2018-02-09 05:46:45 # Node ID 99e65e2a612406e06b0cdca808f0e2412bd4cf93 # Parent 0b7243db68e630895fd12fce5c4176aa5b0a71b5 add language diff --git a/app/controllers/problems_controller.rb b/app/controllers/problems_controller.rb --- a/app/controllers/problems_controller.rb +++ b/app/controllers/problems_controller.rb @@ -165,7 +165,7 @@ redirect_to :controller => 'main', :action => 'list' return end - @submissions = Submission.includes(:user).where(problem_id: params[:id]).order(:user_id,:id) + @submissions = Submission.includes(:user).includes(:language).where(problem_id: params[:id]).order(:user_id,:id) #stat summary range =65 diff --git a/app/views/problems/stat.html.haml b/app/views/problems/stat.html.haml --- a/app/views/problems/stat.html.haml +++ b/app/views/problems/stat.html.haml @@ -32,6 +32,7 @@ %th Login %th Name %th Submitted_at + %th language %th Points %th comment %th IP @@ -45,6 +46,7 @@ %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