diff --git a/app/templates/exercise_export/blank_exercise.html.erb b/app/templates/exercise_export/blank_exercise.html.erb index 74cea75f1..995d04995 100644 --- a/app/templates/exercise_export/blank_exercise.html.erb +++ b/app/templates/exercise_export/blank_exercise.html.erb @@ -57,7 +57,7 @@
- <% @exercise_questions.each do |q| %> + <% @exercise_questions.each_with_index do |q,index| %>
@@ -68,15 +68,27 @@ (<%= q&.question_score %>分)
- <% 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 %> - <%= q_name&.include?("src=\"") ? q_name&.gsub("src=\"","src=\"#{@request_url}") : q_name %> + <% q_name = q.shixun_name&.include?("src=\"") ? q.shixun_name&.gsub("src=\"","src=\"#{@request_url}")&.html_safe : q.shixun_name&.html_safe %> + <%= q_name %>
- <%= q_title&.include?("src=\"") ? q_title&.gsub("src=\"","src=\"#{@request_url}") : q_title %> + <%= q_title %>
+ <% else %> - <%= q_title&.include?("src=\"") ? q_title&.gsub("src=\"","src=\"#{@request_url}") : q_title %> + <%= q_title %> + <% end %>
@@ -134,4 +146,6 @@
+<%= ApplicationController.helpers.pdf_load_sources(*%w(react/public/js/jquery-1.8.3.min.js react/public/js/editormd/marked.min.js))%> + \ No newline at end of file