From f40f8ae0422b6678b002999bbdd25c838f77ba52 Mon Sep 17 00:00:00 2001 From: SylorHuang Date: Tue, 25 Jun 2019 16:58:20 +0800 Subject: [PATCH] fix bug --- app/templates/exercise_export/exercise_user.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/templates/exercise_export/exercise_user.html.erb b/app/templates/exercise_export/exercise_user.html.erb index 3a651f89d..193a25301 100644 --- a/app/templates/exercise_export/exercise_user.html.erb +++ b/app/templates/exercise_export/exercise_user.html.erb @@ -250,7 +250,7 @@ <% if @games.size > 0 %> <% @games.each_with_index do |game, index| %> <% game_score = q.exercise_shixun_challenges.where(challenge_id:game.challenge.id) %> - <% user_score = q.exercise_shixun_answers.where(exercise_shixun_challenge_id: game_score&.id,user_id: @ex_user_user.id) %> + <% user_score = q.exercise_shixun_answers.where(exercise_shixun_challenge_id: game_score&.first&.id,user_id: @ex_user_user.id) %> <%= index + 1 %>