dev_course
SylorHuang 6 years ago
parent a76088fe30
commit 1961753273

@ -245,7 +245,7 @@ module ExportHelper
else
user_course = "--"
end
user_obj_score = e_user.objective_score < 0.0 ? 0.0 : e_user.subjective_score.round(1).to_s
user_obj_score = e_user.objective_score < 0.0 ? 0.0 : e_user.objective_score.round(1).to_s
user_suj_score = e_user.subjective_score < 0.0 ? 0.0 : e_user.subjective_score.round(1).to_s
user_score = e_user.score.present? ? e_user.score.round(1).to_s : 0.0
if e_user.commit_status.present? && e_user.commit_status == 1

@ -13,13 +13,13 @@
</div>
<div class="plr15">
<p class="text-gray">
<%= @exercise.try(:exercise_description).nil? ? "" : @exercise.try(:exercise_description).html_safe %>
<%= @exercise.try(:exercise_description).nil? ? "" : @exercise.try(:exercise_description)&.html_safe %>
</p>
</div>
</div>
<div class="mbt20 bgc">
<div class="ex-scores pd10 text-gray fs13">
<div class="inline-block pull-left">
<div class="inline-block pull-left max-100">
<% if @exercise_single_ques_count > 0 %>
<span class="mr15">单选题<span class="mlr5"><%= @exercise_single_ques_count %></span>题,
共<span class="mlr5"><%= @exercise_single_ques_scores %></span>分</span>
@ -63,12 +63,12 @@
</div>
<div class="pbt5">
<% if q.question_type == 5 %>
<span class="ques-title"><%= q.shixun_name.present? ? q.shixun_name.html_safe : "" %></span>
<span class="ques-title"><%= q.shixun_name.present? ? q.shixun_name&.html_safe : "" %></span>
<div class="mt8 text-gray">
<span><%= q.question_title.present? ? q.question_title.html_safe : "" %></span>
<span><%= q.question_title.present? ? q.question_title&.html_safe : "" %></span>
</div>
<% else %>
<span class="ques-title"><%= q.question_title.present? ? q.question_title.html_safe : "" %></span>
<span class="ques-title"><%= q.question_title.present? ? q.question_title&.html_safe : "" %></span>
<% end %>
</div>
<div class="pbt5">

@ -303,6 +303,9 @@ textarea{
background-color:#eee;
line-height:2;
}
.max-100{
max-width:100%;
}

@ -13,13 +13,13 @@
</div>
<div class="plr15">
<p class="text-gray">
<%= @exercise.try(:exercise_description).nil? ? "" : @exercise.try(:exercise_description).html_safe %>
<%= @exercise.try(:exercise_description).nil? ? "" : @exercise.try(:exercise_description)&.html_safe %>
</p>
</div>
</div>
<div class="mbt20 bgc">
<div class="ex-scores pd10 text-gray fs13">
<div class="inline-block pull-left">
<div class="inline-block pull-left max-100">
<% if @exercise_single_ques_count > 0 %>
<span class="mr15">单选题<span class="mlr5"><%= @exercise_single_ques_count %></span>题,
共<span class="mlr5"><%= @exercise_single_ques_scores %></span>分</span>
@ -162,14 +162,14 @@
</div>
<div class="pbt5">
<% if q_type == 5 %>
<span class="ques-title"><%= q.shixun_name.html_safe %></span>
<span class="ques-title"><%= q.shixun_name&.html_safe %></span>
<div class="mt8 text-gray">
<span><%= q.question_title.html_safe %></span>
<span><%= q.question_title&.html_safe %></span>
</div>
<% elsif q_type == 4 %>
<span class="ques-title"><%= q.question_title.html_safe %></span>
<span class="ques-title"><%= q.question_title&.html_safe %></span>
<% else %>
<span class="ques-title"><%= q.question_title.html_safe %></span>
<span class="ques-title"><%= q.question_title&.html_safe %></span>
<% end %>
</div>
</div>
@ -218,13 +218,13 @@
<% end %>
<p class="pbt10 flex-nowrap">
<span class="pull-left line-34">答案(填空<%= index+1 %></span>
<span class="null-answer"><%= check_answer.html_safe %></span>
<span class="null-answer"><%= check_answer&.html_safe %></span>
</p>
<% end %>
<% elsif q_type == 4 %>
<% check_answer = (user_answer.present? ? user_answer.first.answer_text : '--') %>
<p class="flex-nowrap">
<span class="null-answer main-height"><%= check_answer.html_safe %></span>
<span class="null-answer main-height"><%= check_answer&.html_safe %></span>
</p>
<% else %>
<div class="mbt10">

Loading…
Cancel
Save