|
|
|
@ -1068,7 +1068,7 @@ class PollsController < ApplicationController
|
|
|
|
|
|
|
|
|
|
#筛选/分类,排序
|
|
|
|
|
order = params[:order]
|
|
|
|
|
# b_sort = params[:sort] || "desc"
|
|
|
|
|
order_type = params[:order_type] || "desc"
|
|
|
|
|
choose_type = params[:commit_status]
|
|
|
|
|
group_id = params[:poll_group_id]
|
|
|
|
|
search_content = params[:search]
|
|
|
|
@ -1095,9 +1095,9 @@ class PollsController < ApplicationController
|
|
|
|
|
poll_users_joins = @poll_users_list.joins(user: :user_extension)
|
|
|
|
|
|
|
|
|
|
if order == "student_id"
|
|
|
|
|
@poll_users_list = poll_users_joins.order("user_extensions.student_id DESC")
|
|
|
|
|
@poll_users_list = poll_users_joins.order("user_extensions.student_id #{order_type}")
|
|
|
|
|
else
|
|
|
|
|
@poll_users_list = poll_users_joins.order("end_at DESC")
|
|
|
|
|
@poll_users_list = poll_users_joins.order("end_at #{order_type}")
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
@poll_users_size = @poll_users_list.count
|
|
|
|
|