@ -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