From fba4bf318488bcd1df5eeea72e55048062625e91 Mon Sep 17 00:00:00 2001 From: SylorHuang Date: Sat, 29 Jun 2019 19:33:33 +0800 Subject: [PATCH] fix bug --- app/controllers/zips_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/zips_controller.rb b/app/controllers/zips_controller.rb index b23a3e033..77a41d065 100644 --- a/app/controllers/zips_controller.rb +++ b/app/controllers/zips_controller.rb @@ -49,12 +49,12 @@ class ZipsController < ApplicationController @course = @exercise.course default_ex_users = @exercise.all_exercise_users(current_user.id).exercise_user_committed - @ex_users = default_ex_users.limit 1 #仅导出已提交的,截止后则是全部为提交的。 + @ex_users = default_ex_users #仅导出已提交的,截止后则是全部为提交的。 #可以分班选择 if group_id.present? exercise_students = @course.students.where(course_group_id: group_id) # 试卷所分班的全部人数 user_ids = exercise_students.pluck(:user_id).reject(&:blank?).uniq - @ex_users = @ex_users.where(user_id: user_ids).limit 1 + @ex_users = @ex_users.where(user_id: user_ids) end default_ex_users_size = @ex_users.size