|
|
@ -55,6 +55,7 @@
|
|
|
|
</p>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
<div class="mbt10">
|
|
|
|
<div class="mbt10">
|
|
|
|
<% if @ex_obj_array.size > 0 %>
|
|
|
|
<% if @ex_obj_array.size > 0 %>
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
@ -176,15 +177,17 @@
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
<div class="pbt5">
|
|
|
|
<div class="pbt5">
|
|
|
|
<% if q_type == 0 %>
|
|
|
|
<% if q_type == 0 %>
|
|
|
|
<% q.exercise_choices.each do |s| %>
|
|
|
|
<% q.exercise_choices.each do |s| %>
|
|
|
|
<% check_answer = (user_answer.present? && (s.id == user_answer.first.exercise_choice_id)) ? "choose-answer" : '' %>
|
|
|
|
<% check_answer = (user_answer.present? && (s.id == user_answer.first.exercise_choice_id)) ? "choose-answer" : '' %>
|
|
|
|
<div class="pbt10 clearfix main-choice">
|
|
|
|
<div class="pbt10 main-choice">
|
|
|
|
<span class="choose-radio <%= check_answer %> pull-left mt10"></span>
|
|
|
|
<span class="choose-radio <%= check_answer %> pull-left mt10"></span>
|
|
|
|
<span class="inline-block pull-left ml10 choice-text mt-2"><%= to_markdown(s.choice_text,@request_url) %></span>
|
|
|
|
<span class="inline-block pull-left ml10 choice-text mt-2"><%= to_markdown(s.choice_text,@request_url) %></span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
<% elsif q_type == 1 %>
|
|
|
|
<% elsif q_type == 1 %>
|
|
|
|
<% q.exercise_choices.each do |s| %>
|
|
|
|
<% q.exercise_choices.each do |s| %>
|
|
|
|
<% check_answer = (user_answer.present? && (user_answer.pluck(:exercise_choice_id).include?(s.id))) ? true : false %>
|
|
|
|
<% check_answer = (user_answer.present? && (user_answer.pluck(:exercise_choice_id).include?(s.id))) ? true : false %>
|
|
|
@ -197,6 +200,7 @@
|
|
|
|
<span class="inline-block pull-left choice-text ml10 mt-2"><%= to_markdown(s.choice_text,@request_url) %></span>
|
|
|
|
<span class="inline-block pull-left choice-text ml10 mt-2"><%= to_markdown(s.choice_text,@request_url) %></span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
<% elsif q_type == 2 %>
|
|
|
|
<% elsif q_type == 2 %>
|
|
|
|
<div class="pbt5 clearfix">
|
|
|
|
<div class="pbt5 clearfix">
|
|
|
|
<% q.exercise_choices.each do |s| %>
|
|
|
|
<% q.exercise_choices.each do |s| %>
|
|
|
@ -211,6 +215,7 @@
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
<% elsif q_type == 3 %>
|
|
|
|
<% elsif q_type == 3 %>
|
|
|
|
<% st_counts = q.exercise_standard_answers.pluck(:exercise_choice_id).uniq %>
|
|
|
|
<% st_counts = q.exercise_standard_answers.pluck(:exercise_choice_id).uniq %>
|
|
|
|
<% st_counts.each_with_index do |s,index| %>
|
|
|
|
<% st_counts.each_with_index do |s,index| %>
|
|
|
@ -223,14 +228,16 @@
|
|
|
|
<span class="pull-left line-34">答案(填空<%= index+1 %>):</span>
|
|
|
|
<span class="pull-left line-34">答案(填空<%= index+1 %>):</span>
|
|
|
|
<span class="null-answer pull-left"><%= to_markdown(check_answer,@request_url) %></span>
|
|
|
|
<span class="null-answer pull-left"><%= to_markdown(check_answer,@request_url) %></span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% elsif q_type == 4 %>
|
|
|
|
<% elsif q_type == 4 %>
|
|
|
|
<% check_answer = (user_answer.present? ? user_answer.first.answer_text : '--') %>
|
|
|
|
<% check_answer = (user_answer.present? ? user_answer.first.answer_text : '--') %>
|
|
|
|
<div class="flex-nowrap clearfix">
|
|
|
|
<div class="flex-nowrap">
|
|
|
|
<div class="null-answer main-height">
|
|
|
|
<div class="null-answer main-height">
|
|
|
|
<%= to_markdown(check_answer,@request_url) %>
|
|
|
|
<%= to_markdown(check_answer,@request_url) %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
<% else %>
|
|
|
|
<% else %>
|
|
|
|
<div class="mbt10">
|
|
|
|
<div class="mbt10">
|
|
|
|
<p class="text-gray mbt10">
|
|
|
|
<p class="text-gray mbt10">
|
|
|
@ -327,6 +334,7 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|