dev_forum
SylorHuang 6 years ago
parent 8e37e69a5b
commit 4a257c2960

@ -83,30 +83,28 @@
</div> </div>
<div class="pbt5"> <div class="pbt5">
<% if q.question_type == 0 %> <% if q.question_type == 0 %>
<% q.exercise_choices.each_with_index do |s,index| %> <% q.exercise_choices.each do |s| %>
<p class="pbt5"> <div class="pbt5 clearfix">
<span class="choose-radio"></span> <span class="choose-radio pull-left"></span>
<span class="mr15"><%= convert_to_char((index+1).to_s)%></span> <span class="inline-block pull-left"><%= to_markdown(s.choice_text) %></span>
<span class="inline-block"><%= to_markdown(s.choice_text) %></span> </div>
</p>
<% end %> <% end %>
<% elsif q.question_type == 1 %> <% elsif q.question_type == 1 %>
<% q.exercise_choices.each_with_index do |s,index| %> <% q.exercise_choices.each do |s| %>
<p class="pbt5"> <div class="pbt5 clearfix">
<span class="choose-checkbox"></span> <span class="choose-checkbox pull-left"></span>
<span class="mr20"><%= convert_to_char((index+1).to_s)%></span> <span class="inline-block pull-left"><%= to_markdown(s.choice_text) %></span>
<span class="inline-block"><%= to_markdown(s.choice_text) %></span> </div>
</p>
<% end %> <% end %>
<% elsif q.question_type == 2 %> <% elsif q.question_type == 2 %>
<p class="pbt5"> <div class="pbt5 clearfix">
<% q.exercise_choices.each_with_index do |s,index| %> <% q.exercise_choices.each do |s| %>
<span class="mr15"> <span class="mr15 clearfix">
<span class="choose-radio"></span> <span class="choose-radio pull-left"></span>
<span class="mlr5 inline-block"><%= to_markdown(s.choice_text) %></span> <span class="mlr5 inline-block pull-left"><%= to_markdown(s.choice_text) %></span>
</span> </span>
<% end %> <% end %>
</p> </div>
<% elsif q.question_type == 3 %> <% elsif q.question_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| %>

Loading…
Cancel
Save