|
|
@ -48,16 +48,16 @@ class ZipsController < ApplicationController
|
|
|
|
@course = @exercise.course
|
|
|
|
@course = @exercise.course
|
|
|
|
|
|
|
|
|
|
|
|
default_ex_users = @exercise.all_exercise_users(current_user.id).exercise_user_committed
|
|
|
|
default_ex_users = @exercise.all_exercise_users(current_user.id).exercise_user_committed
|
|
|
|
default_ex_users_size = default_ex_users.size
|
|
|
|
|
|
|
|
@ex_users = default_ex_users #仅导出已提交的,截止后则是全部为提交的。
|
|
|
|
@ex_users = default_ex_users #仅导出已提交的,截止后则是全部为提交的。
|
|
|
|
#可以分班选择
|
|
|
|
#可以分班选择
|
|
|
|
if group_id.present?
|
|
|
|
if group_id.present?
|
|
|
|
exercise_students = @course.students.where(course_group_id: group_id) # 试卷所分班的全部人数
|
|
|
|
exercise_students = @course.students.where(course_group_id: group_id) # 试卷所分班的全部人数
|
|
|
|
user_ids = exercise_students.pluck(:user_id).reject(&:blank?).uniq
|
|
|
|
user_ids = exercise_students.pluck(:user_id).reject(&:blank?).uniq
|
|
|
|
logger.info("+++++++##################_________________user_ids_____________#########{user_ids}")
|
|
|
|
|
|
|
|
@ex_users = @ex_users.where(user_id: user_ids)
|
|
|
|
@ex_users = @ex_users.where(user_id: user_ids)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
# @ex_users = @ex_users.first(200)
|
|
|
|
|
|
|
|
|
|
|
|
default_ex_users_size = @ex_users.size
|
|
|
|
|
|
|
|
|
|
|
|
if default_ex_users_size == 0
|
|
|
|
if default_ex_users_size == 0
|
|
|
|
normal_status(-1,"导出失败,暂时没有已提交的学生")
|
|
|
|
normal_status(-1,"导出失败,暂时没有已提交的学生")
|
|
|
|
elsif default_ex_users_size > 100
|
|
|
|
elsif default_ex_users_size > 100
|
|
|
|