|
|
@ -181,21 +181,21 @@
|
|
|
|
<% 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="pbt5 clearfix">
|
|
|
|
<div class="pbt5 clearfix main-choice">
|
|
|
|
<span class="choose-radio <%= check_answer %> pull-left line-24 mt5"></span>
|
|
|
|
<span class="choose-radio <%= check_answer %> pull-left mt8"></span>
|
|
|
|
<span class="inline-block pull-left line-24 ml10"><%= to_markdown(s.choice_text) %></span>
|
|
|
|
<span class="inline-block pull-left ml10 choice-text"><%= to_markdown(s.choice_text) %></span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% 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 %>
|
|
|
|
<div class="pbt5 clearfix">
|
|
|
|
<div class="pbt5 clearfix main-choice">
|
|
|
|
<% if check_answer %>
|
|
|
|
<% if check_answer %>
|
|
|
|
<span class="choose-checkbox choose-answer-multi pull-left line-24 mt5" ></span>
|
|
|
|
<span class="choose-checkbox choose-answer-multi mt8" ></span>
|
|
|
|
<% else %>
|
|
|
|
<% else %>
|
|
|
|
<span class="choose-checkbox pull-left line-24 mt5"></span>
|
|
|
|
<span class="choose-checkbox pull-left mt8"></span>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<span class="inline-block pull-left line-24 ml10"><%= to_markdown(s.choice_text) %></span>
|
|
|
|
<span class="inline-block pull-left choice-text ml10"><%= to_markdown(s.choice_text) %></span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% elsif q_type == 2 %>
|
|
|
|
<% elsif q_type == 2 %>
|
|
|
|