From f613331443ec493aec0dd9e5b96b6af67e08e4e8 Mon Sep 17 00:00:00 2001 From: SylorHuang Date: Mon, 1 Jul 2019 15:38:12 +0800 Subject: [PATCH] fix bug --- app/templates/exercise_export/exercise_export.css | 3 +++ .../exercise_export/exercise_user.html.erb | 13 ++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/app/templates/exercise_export/exercise_export.css b/app/templates/exercise_export/exercise_export.css index 2745382f7..0c4bf54e5 100644 --- a/app/templates/exercise_export/exercise_export.css +++ b/app/templates/exercise_export/exercise_export.css @@ -328,6 +328,9 @@ textarea{ .choice-text p{ margin-bottom:0; } +.mt-2{ + margin-top:-2px; +} diff --git a/app/templates/exercise_export/exercise_user.html.erb b/app/templates/exercise_export/exercise_user.html.erb index 62d2132ce..7e40047b0 100644 --- a/app/templates/exercise_export/exercise_user.html.erb +++ b/app/templates/exercise_export/exercise_user.html.erb @@ -21,8 +21,8 @@

<% if @exercise_single_ques_count > 0 %> - 单选题<%= @exercise_single_ques_count %>题, - 共<%= @exercise_single_ques_scores %> + 单选题<%= @exercise_single_ques_count %>题, + 共<%= @exercise_single_ques_scores %> <% end %> <% if @exercise_double_ques_count > 0 %> 多选题<%= @exercise_double_ques_count %>题, @@ -44,7 +44,6 @@ 实训题<%= @exercise_ques_shixun_count %>题, 共<%= @exercise_ques_shixun_scores %> <% end %> - <% if @exercise_ques_count > 0 %> <%= @exercise_ques_scores %>分 @@ -183,7 +182,7 @@ <% check_answer = (user_answer.present? && (s.id == user_answer.first.exercise_choice_id)) ? "choose-answer" : '' %>

- <%= to_markdown(s.choice_text,@request_url) %> + <%= to_markdown(s.choice_text,@request_url) %>
<% end %> <% elsif q_type == 1 %> @@ -195,7 +194,7 @@ <% else %> <% end %> - <%= to_markdown(s.choice_text,@request_url) %> + <%= to_markdown(s.choice_text,@request_url) %>
<% end %> <% elsif q_type == 2 %> @@ -221,13 +220,13 @@ <% check_answer = "--" %> <% end %>
-
答案(填空<%= index+1 %>):
+
答案(填空<%= index+1 %>):
<%= to_markdown(check_answer,@request_url) %>
<% end %> <% elsif q_type == 4 %> <% check_answer = (user_answer.present? ? user_answer.first.answer_text : '--') %> -
+
<%= to_markdown(check_answer,@request_url) %>