实践教学组的排行榜

dev_aliyun
cxt 5 years ago
parent e53cc859d1
commit 56f1b9b056

@ -305,7 +305,7 @@ class CompetitionsController < ApplicationController
end end
records_length = 97 records_length = 97
@records = @records[0..records_length] @records = @records[0..records_length]
elsif @competition.identifier == "gcc-annotation-2018" elsif @competition.identifier == "gcc-annotation-2018" || @competition.identifier == "gcc-course-2019"
@records = @competition.competition_teams.includes(:user => [:user_extensions => [:school]]) @records = @competition.competition_teams.includes(:user => [:user_extensions => [:school]])
@records.each do |team| @records.each do |team|
team[:s_score] = team.competition_scores.where(:competition_id => @competition.id).first.try(:score).to_f.try(:round, 3) team[:s_score] = team.competition_scores.where(:competition_id => @competition.id).first.try(:score).to_f.try(:round, 3)
@ -494,7 +494,7 @@ class CompetitionsController < ApplicationController
sheet1[count_row,10] = com_spend_time team[:s_spend_time].to_i sheet1[count_row,10] = com_spend_time team[:s_spend_time].to_i
count_row += 1 count_row += 1
end end
elsif @competition.identifier == "gcc-annotation-2018" elsif @competition.identifier == "gcc-annotation-2018" || @competition.identifier == "gcc-course-2019"
records = @competition.competition_teams records = @competition.competition_teams
records.each do |team| records.each do |team|
team[:s_score] = team.competition_scores.where(:competition_id => @competition.id).first.try(:score).to_f.try(:round, 3) team[:s_score] = team.competition_scores.where(:competition_id => @competition.id).first.try(:score).to_f.try(:round, 3)

@ -44,7 +44,7 @@
<% @records.each_with_index do |record, index| %> <% @records.each_with_index do |record, index| %>
<% record_user = record.user %> <% record_user = record.user %>
<div class="rankingList-line clearfix"> <div class="rankingList-line clearfix">
<% if @competition.identifier == "gcc-annotation-2018" %> <% if @competition.identifier == "gcc-annotation-2018" || @competition.identifier == "gcc-course-2019" %>
<li class="with40"> <li class="with40">
<% if index == 0 %> <% if index == 0 %>
<img src="/images/educoder/competition/1.png" class="fl ranking-img"> <img src="/images/educoder/competition/1.png" class="fl ranking-img">

Loading…
Cancel
Save