From a3011c319b8cd32676c32938bf041824bb81fc68 Mon Sep 17 00:00:00 2001 From: cxt Date: Tue, 9 Aug 2016 16:40:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=91=E7=9A=84=E9=A2=98=E5=BA=93=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E6=88=91=E7=9A=84=E6=89=80=E6=9C=89=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 932617671..54d43c891 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -599,7 +599,7 @@ class UsersController < ApplicationController if(params[:type].blank? || params[:type] == "1") #我的题库 courses = @user.courses.where("is_delete = 1") course_ids = courses.empty? ? "(-1)" : "(" + courses.map{|course| course.id}.join(",") + ")" - @homeworks = HomeworkCommon.where("user_id = #{@user.id} and publish_time <= '#{Date.today}' and course_id not in #{course_ids}").order("#{@order} #{@b_sort}") + @homeworks = HomeworkCommon.where("user_id = #{@user.id} and course_id not in #{course_ids}").order("#{@order} #{@b_sort}") elsif params[:type] == "2" #公共题库 visible_course = Course.where("is_delete = 0") visible_course_ids = visible_course.empty? ? "(-1)" : "(" + visible_course.map{|course| course.id}.join(",") + ")"