学生列表的排序

dev_hs
cxt 5 years ago
parent 417443a39a
commit 4fd778ebe2

@ -685,12 +685,12 @@ class CoursesController < ApplicationController
if order == 1
# REDO:Extension
@students = @students.includes(user: :user_extension).order("user_extensions.student_id")
@students = @students.includes(user: :user_extension).order("user_extensions.student_id, course_members.id")
elsif order == 2
@students = @students.includes(:course_group).order("course_groups.position")
@students = @students.includes(:course_group).order("course_groups.position, course_members.id")
else
# REDO:Extension
@students = @students.includes(user: :user_extension).order("user_extensions.student_id")
@students = @students.includes(user: :user_extension).order("user_extensions.student_id, course_members.id")
end
if course_group_id.present?

Loading…
Cancel
Save