From bef37e5c0f9f911418474f14435a980ebca4befd Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Mon, 9 Jun 2014 10:07:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BD=9C=E4=B8=9A=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E5=88=97=E8=A1=A8=E9=A6=96=E5=85=88=E6=8C=89=E8=AF=84?= =?UTF-8?q?=E5=88=86=E6=8E=92=E5=BA=8F=EF=BC=8C=E7=84=B6=E5=90=8E=E6=8C=89?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/bids_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/bids_controller.rb b/app/controllers/bids_controller.rb index 923225606..db2ea9249 100644 --- a/app/controllers/bids_controller.rb +++ b/app/controllers/bids_controller.rb @@ -412,7 +412,7 @@ class BidsController < ApplicationController #增加作业按评分排序, @homework_list = HomeworkAttach.find_by_sql("SELECT homework_attaches.*, (SELECT AVG(stars) FROM seems_rateable_rates WHERE rateable_type = 'HomeworkAttach' AND rateable_id = homework_attaches.id) AS score - FROM homework_attaches WHERE bid_id = #{@bid.id} ORDER BY score DESC",:include => [:attachments]) + FROM homework_attaches WHERE bid_id = #{@bid.id} ORDER BY score DESC,created_at ASC",:include => [:attachments]) if params[:student_id].present? @temp = [] @homework_list.each do |pro|