|
|
|
@ -57,7 +57,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="mbt10">
|
|
|
|
|
<% @exercise_questions.each do |q| %>
|
|
|
|
|
<% @exercise_questions.each_with_index do |q,index| %>
|
|
|
|
|
<div class="bdc">
|
|
|
|
|
<div class="pbt10">
|
|
|
|
|
<div class="pbt5">
|
|
|
|
@ -68,15 +68,27 @@
|
|
|
|
|
<span class="text-gray mlr5">(<%= q&.question_score %>分)</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="pbt5">
|
|
|
|
|
<% q_title = q.question_title&.html_safe %>
|
|
|
|
|
<% q_title = q.question_title&.include?("src=\"") ? q.question_title&.gsub("src=\"","src=\"#{@request_url}")&.html_safe : q.question_title&.html_safe %>
|
|
|
|
|
<% if q.question_type == 5 %>
|
|
|
|
|
<% q_name = q.shixun_name&.html_safe %>
|
|
|
|
|
<span class="ques-title"><%= q_name&.include?("src=\"") ? q_name&.gsub("src=\"","src=\"#{@request_url}") : q_name %></span>
|
|
|
|
|
<% q_name = q.shixun_name&.include?("src=\"") ? q.shixun_name&.gsub("src=\"","src=\"#{@request_url}")&.html_safe : q.shixun_name&.html_safe %>
|
|
|
|
|
<span class="ques-title" id="ques_marked_<%= index %>"><%= q_name %></span>
|
|
|
|
|
<div class="mt8 text-gray">
|
|
|
|
|
<span><%= q_title&.include?("src=\"") ? q_title&.gsub("src=\"","src=\"#{@request_url}") : q_title %></span>
|
|
|
|
|
<span id="ques_title_<%= index %>"><%= q_title %></span>
|
|
|
|
|
</div>
|
|
|
|
|
<script>
|
|
|
|
|
$(function () {
|
|
|
|
|
$("#ques_marked_<%= index %>").html(marked(<%= q_name %>))
|
|
|
|
|
$("#ques_title_<%= index %>").html(marked(<%= q_title %>))
|
|
|
|
|
})
|
|
|
|
|
</script>
|
|
|
|
|
<% else %>
|
|
|
|
|
<span class="ques-title"><%= q_title&.include?("src=\"") ? q_title&.gsub("src=\"","src=\"#{@request_url}") : q_title %></span>
|
|
|
|
|
<span class="ques-title" id="ques_title_<%= index %>"><%= q_title %></span>
|
|
|
|
|
<script>
|
|
|
|
|
$(function () {
|
|
|
|
|
$("#ques_title_<%= index %>").html(marked(<%= q_title %>))
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
</script>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="pbt5">
|
|
|
|
@ -134,4 +146,6 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</body>
|
|
|
|
|
<%= ApplicationController.helpers.pdf_load_sources(*%w(react/public/js/jquery-1.8.3.min.js react/public/js/editormd/marked.min.js))%>
|
|
|
|
|
|
|
|
|
|
</html>
|