|
|
|
@ -112,6 +112,7 @@
|
|
|
|
|
<div class="mbt10">
|
|
|
|
|
<% @exercise_questions.each do |q| %>
|
|
|
|
|
<% q_type = q.question_type %>
|
|
|
|
|
<% games =( q_type == 5 ? @ex_user_user.games.ch_games(q.exercise_shixun_challenges.pluck(:challenge_id)) : nil) %>
|
|
|
|
|
<% user_answer = (q_type == 5 ? q.exercise_shixun_answers.where(user_id: @ex_user_user.id) : q.exercise_answers.where(user_id: @ex_user_user.id)) %>
|
|
|
|
|
<% this_ques_status = @ex_obj_array.detect{|f| f[:q_id] == q.id} %>
|
|
|
|
|
<% main_ques_status = @ex_sub_array.detect{|f| f[:q_id] == q.id} %>
|
|
|
|
@ -247,8 +248,8 @@
|
|
|
|
|
<th width="13%">得分/满分</th>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
<% if @games.size > 0 %>
|
|
|
|
|
<% @games.each_with_index do |game, index| %>
|
|
|
|
|
<% if games.present? %>
|
|
|
|
|
<% 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&.first&.id,user_id: @ex_user_user.id) %>
|
|
|
|
|
<tr>
|
|
|
|
@ -286,7 +287,7 @@
|
|
|
|
|
<p class="text-gray mbt10">
|
|
|
|
|
<span class="fl font-bd">实训详情</span>
|
|
|
|
|
</p>
|
|
|
|
|
<% @games.each_with_index do |game, index| %>
|
|
|
|
|
<% games&.each_with_index do |game, index| %>
|
|
|
|
|
<div class="mbt10">
|
|
|
|
|
<p class="clearfix">
|
|
|
|
|
<span class="fl mt3"><span class="font-bd mr15">第<%= index+1 %>关</span><%= game.challenge.subject %></span>
|
|
|
|
|