dev_course
cxt 6 years ago
parent e0e224a03a
commit 620539b924

@ -173,8 +173,8 @@ class HomeworkCommonsController < ApplicationController
end end
# 排序 # 排序
rorder = params[:order] || "update_time" rorder = params[:order].blank? ? "update_time" : params[:order]
b_order = params[:b_order] || "desc" b_order = params[:b_order].blank? ? "desc" : params[:b_order]
if rorder == "update_time" || rorder == "work_score" if rorder == "update_time" || rorder == "work_score"
@student_works = @student_works.order("student_works.#{rorder} #{b_order}") @student_works = @student_works.order("student_works.#{rorder} #{b_order}")
elsif rorder == "student_id" elsif rorder == "student_id"

Loading…
Cancel
Save