dev_aliyun
p31729568 5 years ago
parent be11a48ea8
commit c49983e224

@ -33,9 +33,9 @@ class CompetitionTeamsController < ApplicationController
@forked_myshixun_count_map.each { |k, v| @myshixun_count_map[forked_shixun_map[k]] += v }
@course_count_map = get_valid_course_count(shixun_ids)
forked_map = get_valid_course_count(forked_shixun_map.keys)
@forked_map = get_valid_course_count(forked_shixun_map.keys)
@forked_course_count_map = {}
forked_map.each do |forked_id, course_count|
@forked_map.each do |forked_id, course_count|
@forked_course_count_map[forked_shixun_map[forked_id]] ||= 0
@forked_course_count_map[forked_shixun_map[forked_id]] += course_count
end

@ -98,7 +98,7 @@
total_members_count += course.members_count.to_i
total_shixun_homework_count += course['shixun_homework_count'].to_i
score = 500 + 5 * @course_shixun_count_map.fetch(course.id, 0) * @course_myshixun_map.fetch(course.id, 0)
score = 500 + 5 * @forked_map.fetch(course.id, 0) * @course_myshixun_map.fetch(course.id, 0)
total_course_score += score
%>
<tr>

Loading…
Cancel
Save