#1761 修复关闭匿评不可用
This commit is contained in:
parent
23140307aa
commit
b79ec2b50f
|
@ -1049,7 +1049,7 @@ class BidsController < ApplicationController
|
||||||
@totle_size = 0
|
@totle_size = 0
|
||||||
@bid.homeworks.map { |homework| @totle_size += homework.homework_evaluations.count}
|
@bid.homeworks.map { |homework| @totle_size += homework.homework_evaluations.count}
|
||||||
@cur_size = 0
|
@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
|
end
|
||||||
@percent = format("%.2f",(@cur_size.to_f / ( @totle_size == 0 ? 1 : @totle_size)) * 100)
|
@percent = format("%.2f",(@cur_size.to_f / ( @totle_size == 0 ? 1 : @totle_size)) * 100)
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
|
|
Loading…
Reference in New Issue