#1761 修复关闭匿评不可用

This commit is contained in:
sw 2014-12-31 10:09:00 +08:00
parent 23140307aa
commit b79ec2b50f
1 changed files with 1 additions and 1 deletions

View File

@ -1049,7 +1049,7 @@ class BidsController < ApplicationController
@totle_size = 0
@bid.homeworks.map { |homework| @totle_size += homework.homework_evaluations.count}
@cur_size = 0
@bid.homeworks.map { |homework| @cur_size += homework.rates(:quality).where("seems_rateable_rates.rater_id is_teacher_score = 0").count}
@bid.homeworks.map { |homework| @cur_size += homework.rates(:quality).where("seems_rateable_rates.is_teacher_score = 0").count}
end
@percent = format("%.2f",(@cur_size.to_f / ( @totle_size == 0 ? 1 : @totle_size)) * 100)
respond_to do |format|