- <% q_title = q.question_title&.html_safe %>
<% if q.question_type == 5 %>
- <% q_name = q.shixun_name&.html_safe %>
-
<%= q_name&.include?("src=\"") ? q_name&.gsub("src=\"","src=\"#{@request_url}") : q_name %>
+
<%= to_markdown(q.shixun_name) %>
- <%= q_title&.include?("src=\"") ? q_title&.gsub("src=\"","src=\"#{@request_url}") : q_title %>
+ <%= to_markdown(q.question_title) %>
<% else %>
-
<%= q_title&.include?("src=\"") ? q_title&.gsub("src=\"","src=\"#{@request_url}") : q_title %>
+
<%= to_markdown(q.question_title) %>
<% end %>
<% if q.question_type == 0 %>
- <% q.exercise_choices.each_with_index do |s,index| %>
-
-
- <%= convert_to_char((index+1).to_s)%><%= s.choice_text%>
-
+ <% q.exercise_choices.each do |s| %>
+
+
+ <%= to_markdown(s.choice_text) %>
+
<% end %>
<% elsif q.question_type == 1 %>
- <% q.exercise_choices.each_with_index do |s,index| %>
-
-
- <%= convert_to_char((index+1).to_s)%><%= s.choice_text%>
-
+ <% q.exercise_choices.each do |s| %>
+
+
+ <%= to_markdown(s.choice_text) %>
+
<% end %>
<% elsif q.question_type == 2 %>
-
- <% q.exercise_choices.each_with_index do |s,index| %>
-
-
- <%= s.choice_text %>
+
+ <% q.exercise_choices.each do |s| %>
+
+
+ <%= s.choice_text %>
<% end %>
-
+
<% elsif q.question_type == 3 %>
<% st_counts = q.exercise_standard_answers.pluck(:exercise_choice_id).uniq %>
<% st_counts.each_with_index do |s,index| %>
@@ -134,4 +131,5 @@