关闭匿评时匿评比例计算不正确

This commit is contained in:
sw 2015-05-29 10:22:16 +08:00
parent f2ea879b9b
commit 27de224693
1 changed files with 1 additions and 1 deletions

View File

@ -172,7 +172,7 @@ class HomeworkCommonController < ApplicationController
elsif @homework_detail_manual.comment_status == 2
@homework.student_works.map { |work| @totle_size += work.student_works_evaluation_distributions.count}
@cur_size = 0
@homework.student_works.map { |work| @cur_size += work.student_works_scores.count}
@homework.student_works.map { |work| @cur_size += work.student_works_scores.where(:reviewer_role => 3).count}
end
@percent = format("%.2f",(@cur_size.to_f / ( @totle_size == 0 ? 1 : @totle_size)) * 100)
respond_to do |format|