From e808b0bb3d366192829fd4519104cfc1e5fa5186 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Wed, 26 Jun 2019 13:59:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E5=88=97=E8=A1=A8=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/homework_commons_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/homework_commons_helper.rb b/app/helpers/homework_commons_helper.rb index 2d3827fac..261fc85e9 100644 --- a/app/helpers/homework_commons_helper.rb +++ b/app/helpers/homework_commons_helper.rb @@ -176,7 +176,7 @@ module HomeworkCommonsHelper # 作品数统计:type: 1 已提交 0 未提交 def studentwork_count homework_common, type, member student_works = homework_common.teacher_works(member) - type == 1 ? student_works.select{|work| work.work_status != 0}.size : student_works.select{|work| work.work_status = 0}.size + type == 1 ? student_works.where("work_status != 0").size : student_works.where(work_status: 0).size end # 上次查重的时间