From 244f356fdef72cae7859b0385e3bd0e5cc17ccab Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Mon, 8 Jul 2019 11:01:42 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=AE=A1=E7=AE=97=E6=88=90?= =?UTF-8?q?=E7=BB=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/homework_commons_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/homework_commons_controller.rb b/app/controllers/homework_commons_controller.rb index 9a12634cf..97b9ecc44 100644 --- a/app/controllers/homework_commons_controller.rb +++ b/app/controllers/homework_commons_controller.rb @@ -250,7 +250,7 @@ class HomeworkCommonsController < ApplicationController student_works = @homework.student_works.where(user_id: user_ids) end - myshixuns = Myshixun.where(shixun_id: params[:shixun_id], user_id: user_ids). + myshixuns = Myshixun.where(shixun_id: @homework.homework_commons_shixun&.shixun_id, user_id: user_ids). includes(:games).where(games: {challenge_id: @homework.homework_challenge_settings.pluck(:challenge_id)}) challenge_settings = @homework.homework_challenge_settings myshixuns.find_each(batch_size: 100) do |myshixun|