From 552c27c51dffdf8c1c6e15da61d2e93435fe4381 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Thu, 2 Apr 2015 08:48:01 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E4=BD=9C=E4=B8=9A=E5=AD=A6?= =?UTF-8?q?=E7=94=9F=E6=8F=90=E9=97=AE=E9=97=AE=E9=A2=98=E8=AE=A1=E6=95=B0?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/homework_service.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/services/homework_service.rb b/app/services/homework_service.rb index f9be6f79d..d22c62a5a 100644 --- a/app/services/homework_service.rb +++ b/app/services/homework_service.rb @@ -20,7 +20,7 @@ class HomeworkService many_times = course.homeworks.index(@bid) + 1 name = @bid.name homework_count = @bid.homeworks.count #已提交的作业数量 - student_questions_count = @bid.commit.nil? ? 0 : @bid.commit + student_questions_count = @bid.journals_for_messages.where('m_parent_id IS NULL').count description = @bid.description #if is_course_teacher(User.current, course) && @bid.open_anonymous_evaluation == 1 && @bid.homeworks.count >= 2 state = @bid.comment_status @@ -282,7 +282,7 @@ class HomeworkService many_times = course.homeworks.index(@bid) + 1 name = @bid.name homework_count = @bid.homeworks.count #已提交的作业数量 - student_questions_count = @bid.commit.nil? ? 0 : @bid.commit + student_questions_count = @bid.journals_for_messages.where('m_parent_id IS NULL').count description = @bid.description #if is_course_teacher(User.current, course) && @bid.open_anonymous_evaluation == 1 && @bid.homeworks.count >= 2 state = @bid.comment_status