From 50c7e9815e7d71ab46e641c07ad94b72968c0c9c Mon Sep 17 00:00:00 2001 From: SylorHuang Date: Tue, 2 Jul 2019 13:43:19 +0800 Subject: [PATCH] fix bug --- app/controllers/polls_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/polls_controller.rb b/app/controllers/polls_controller.rb index 90ca1778e..24aa54309 100644 --- a/app/controllers/polls_controller.rb +++ b/app/controllers/polls_controller.rb @@ -953,12 +953,14 @@ class PollsController < ApplicationController @poll_publish_count = get_user_permission_course(poll_ids,2).count @poll_unpublish_count = get_user_permission_course(poll_ids,1).count @course_all_members = @course.students + logger.info("#######F___________poll_user_ids________________####{@poll.poll_users.pluck(:id)}") @poll_group_counts = @course.course_groups_count if @user_course_identity < Course::STUDENT #当前为老师,而且老师只能查看自己班级的/课堂的问卷 @poll_current_user_status = 0 - @poll_users_list = @poll.all_poll_users(current_user.id).distinct #该老师分班的全部学生 + @poll_users_list = @poll.all_poll_users(current_user.id) #该老师分班的全部学生 get_poll_answers(@poll_users_list) + logger.info("#######F__________@poll_users_list________________####{@poll_users_list.pluck(:id)}") if @poll_list_status == 1 @poll_course_groups =[] @@ -1026,9 +1028,7 @@ class PollsController < ApplicationController #搜索 if search_content.present? - @poll_users_list = @poll_users_list.joins(user: :user_extension).where("CONCAT(lastname, firstname) like ? OR student_id like ?", "%#{search_content}%", "%#{search_content}%") - end @poll_users_size = @poll_users_list.count