From e167a28d49ad15983730a805332f77efac4b8a5f Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 18 Mar 2016 14:59:34 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E6=8E=A8=E8=8D=90=E7=9A=84?= =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/courses/_recommendation.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/courses/_recommendation.html.erb b/app/views/courses/_recommendation.html.erb index f697383ca..28cc54ab8 100644 --- a/app/views/courses/_recommendation.html.erb +++ b/app/views/courses/_recommendation.html.erb @@ -11,8 +11,8 @@ <% if e_course.attachments.count > 0 %> <%= l(:project_module_attachments) %>(<%= link_to e_course.attachments.count, course_files_path(e_course), :class => "linkBlue2" %>) <% end %> - <% if e_course.homework_commons.count > 0 %> - <%= l(:label_homework_commont) %>(<%= link_to e_course.homework_commons.count, homework_common_index_path(:course=>e_course.id), :class => "linkBlue2" %>) + <% if e_course.homework_commons.where("publish_time <= '#{Date.today}'").count > 0 %> + <%= l(:label_homework_commont) %>(<%= link_to e_course.homework_commons.where("publish_time <= '#{Date.today}'").count, homework_common_index_path(:course=>e_course.id), :class => "linkBlue2" %>) <% end %>