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