@ -1005,11 +1005,6 @@ class PollsController < ApplicationController
if @poll_users_list . present? && @poll_users_list . count > 0
if order == " student_id "
@poll_users_list = @poll_users_list . joins ( user : [ :user_extension ] ) . order ( " user_extensions.student_id DESC " )
else
@poll_users_list = @poll_users_list . order ( " end_at DESC " )
end
#答题状态的选择
if choose_type . present?
@ -1028,6 +1023,12 @@ class PollsController < ApplicationController
@poll_users_list = @poll_users_list . joins ( user : :user_extension ) . where ( " CONCAT(lastname, firstname) like ? OR student_id like ? " , " % #{ search_content } % " , " % #{ search_content } % " )
end
if order == " student_id "
@poll_users_list = @poll_users_list . joins ( user : :user_extension ) . order ( " user_extensions.student_id DESC " )
else
@poll_users_list = @poll_users_list . order ( " end_at DESC " )
end
logger . info ( " # # # # # # # F_______@poll_users_list_last___@users_ids________________ # # # #{ @poll_users_list . pluck ( :user_id ) } " )
@poll_users_size = @poll_users_list . count