From 96accf1e7a6a0dd57134a4fae234915d2fed9bc4 Mon Sep 17 00:00:00 2001 From: cxt Date: Thu, 14 Apr 2016 15:35:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=AA=E5=8F=91=E5=B8=83=E7=9A=84=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A=E4=B8=8D=E5=BA=94=E8=BF=9B=E8=A1=8C=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E7=9A=84=E7=A7=AF=E5=88=86=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/member.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/member.rb b/app/models/member.rb index e19e1f0df..cc227cf31 100644 --- a/app/models/member.rb +++ b/app/models/member.rb @@ -145,7 +145,7 @@ class Member < ActiveRecord::Base #当前课程的作业列表 def homework_common_list - HomeworkCommon.where(:course_id => self.course_id) + HomeworkCommon.where("course_id = ? and publish_time is not null and publish_time <= '#{Date.today}'", self.course_id) end #当前学生在指定作业内的得分