From 4c39dcc6774707c996d213284096f04c89836fe3 Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Thu, 14 Jul 2016 17:39:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=EF=BC=9A=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E7=8F=AD=E7=BA=A7=E4=B8=8B=E6=9C=89=E6=8C=82=E8=B5=B7=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A=E6=89=80=E6=9C=89=E4=BD=9C=E4=B8=9A=E9=83=BD=E4=B8=8D?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E7=9A=84BUG=EF=BC=8C=E5=B0=86=E7=8F=AD?= =?UTF-8?q?=E7=BA=A7=E4=B8=8B=E4=BD=9C=E4=B8=9A=E3=80=81=E6=B5=8B=E9=AA=8C?= =?UTF-8?q?=E5=8F=91=E9=80=81=E6=8C=89=E9=92=AE=E5=B1=8F=E8=94=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/courses_service.rb | 2 +- public/assets/wechat/class.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/services/courses_service.rb b/app/services/courses_service.rb index a55a81e89..294c77019 100644 --- a/app/services/courses_service.rb +++ b/app/services/courses_service.rb @@ -419,7 +419,7 @@ class CoursesService def homework_list params,current_user course = Course.find(params[:id]) if course.is_public != 0 || current_user.member_of_course?(course) - bids = course.homework_commons.page(params[:page] || 1).per(20).order('created_at DESC') + bids = course.homework_commons.where("publish_time <= ?",Time.now.strftime("%Y-%m-%d")).page(params[:page] || 1).per(20).order('created_at DESC') bids = bids.like(params[:name]) if params[:name].present? homeworks = [] bids.each do |bid| diff --git a/public/assets/wechat/class.html b/public/assets/wechat/class.html index da58003cc..294610ac7 100644 --- a/public/assets/wechat/class.html +++ b/public/assets/wechat/class.html @@ -42,14 +42,14 @@
-
{{r.homework_name}}发送
+
{{r.homework_name}}发送

暂无作业,
请登录Trustie网站,在PC浏览器中上传作业。

-
{{r.exercise_name}}发送
+
{{r.exercise_name}}发送

暂无小测验,
请登录Trustie网站,在PC浏览器中上传小测验。