diff --git a/app/controllers/bids_controller.rb b/app/controllers/bids_controller.rb index be97fdb6e..21b3cc531 100644 --- a/app/controllers/bids_controller.rb +++ b/app/controllers/bids_controller.rb @@ -1035,11 +1035,12 @@ class BidsController < ApplicationController def alert_anonymous_comment @bid = Bid.find params[:id] @course = @bid.courses.first + @cur_size = 0 + @totle_size = 0 if @bid.comment_status == 0 @totle_size = searchStudent(@course).size @cur_size = @bid.homeworks.size elsif @bid.comment_status == 1 - @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.is_teacher_score = 0").count}