dev_forum
SylorHuang 6 years ago
parent 8e37e69a5b
commit 4a257c2960

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

Loading…
Cancel
Save