开启、关闭匿评是有时候报500
This commit is contained in:
parent
500b54a466
commit
42124e8ec5
|
@ -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}
|
||||
|
|
Loading…
Reference in New Issue