|
|
|
@ -1024,9 +1024,9 @@ class PollsController < ApplicationController
|
|
|
|
|
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")
|
|
|
|
|
@poll_users_list = @poll_users_list.joins(user: :user_extension).order("end_at DESC")
|
|
|
|
|
end
|
|
|
|
|
logger.info("#######user_id: ####{@poll_users_list.pluck(:user_id).sort}")
|
|
|
|
|
logger.info("#######user_id: ####{@poll_users_list.pluck(:id, :user_id)}")
|
|
|
|
|
|
|
|
|
|
@poll_users_size = @poll_users_list.count
|
|
|
|
|
|
|
|
|
@ -1034,7 +1034,7 @@ class PollsController < ApplicationController
|
|
|
|
|
page = params[:page] || 1
|
|
|
|
|
limit = params[:limit] || 20
|
|
|
|
|
@poll_users_list = @poll_users_list.page(page).per(limit)
|
|
|
|
|
logger.info("#####page_user: #{@poll_users_list.pluck(:user_id).sort}")
|
|
|
|
|
logger.info("#####page_user: #{@poll_users_list.pluck(:id, :user_id)}")
|
|
|
|
|
else
|
|
|
|
|
@poll_users_list = []
|
|
|
|
|
@poll_users_size = 0
|
|
|
|
|