From d98eb8748ec3214e0ca0f70d3828d7881b30151a Mon Sep 17 00:00:00 2001 From: linchun Date: Wed, 30 Mar 2016 14:17:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=AE=A1=E7=90=86=E5=91=98?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E4=BD=9C=E4=B8=9A=E5=88=97=E8=A1=A8=E7=9A=84?= =?UTF-8?q?=E6=88=AA=E6=AD=A2=E6=97=B6=E9=97=B4=E4=B8=BA=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E5=8F=91=E5=B8=83=E6=97=B6=E9=97=B4=EF=BC=8C=E5=B9=B6=E4=B8=94?= =?UTF-8?q?=E6=8C=89=E6=97=B6=E9=97=B4=E5=80=92=E5=BA=8F=E6=8E=92=E5=88=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/admin_controller.rb | 3 ++- app/views/admin/homework.html.erb | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index c7aa42b9e..e1e99447d 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -548,7 +548,8 @@ class AdminController < ApplicationController #作业 def homework - @homework = HomeworkCommon.order('end_time desc') + #@homework = HomeworkCommon.order('end_time desc') + @homework = HomeworkCommon.order( 'created_at desc ') @homework = paginateHelper @homework,30 @page = (params['page'] || 1).to_i - 1 respond_to do |format| diff --git a/app/views/admin/homework.html.erb b/app/views/admin/homework.html.erb index 7260d68ff..4188fecea 100644 --- a/app/views/admin/homework.html.erb +++ b/app/views/admin/homework.html.erb @@ -22,7 +22,7 @@ 提交作品数 - 提交截止日期 + 作业发布日期 @@ -51,7 +51,7 @@ <%=link_to(StudentWork.where('homework_common_id=?',homework.id).count, student_work_index_path(:homework => homework.id))%> - <%=format_date(homework.end_time) %> + <%=format_date( homework.created_at ) %> <% end %>