|
|
|
@ -44,7 +44,6 @@
|
|
|
|
|
<span class="mr15">实训题<span class="mlr5"><%= @exercise_ques_shixun_count %></span>题,
|
|
|
|
|
共<span class="mlr5"><%= @exercise_ques_shixun_scores %></span>分</span>
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
<% if @exercise_ques_count > 0 %>
|
|
|
|
|
<span class="pull-right">
|
|
|
|
|
共<span class="text-orange mlr5"><%= @exercise_ques_scores %></span>分
|
|
|
|
@ -56,6 +55,7 @@
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
|
<div class="mbt10">
|
|
|
|
|
<% if @ex_obj_array.size > 0 %>
|
|
|
|
|
<div>
|
|
|
|
@ -177,27 +177,30 @@
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
|
<div class="pbt5">
|
|
|
|
|
<% if q_type == 0 %>
|
|
|
|
|
<% q.exercise_choices.each do |s| %>
|
|
|
|
|
<% check_answer = (user_answer.present? && (s.id == user_answer.first.exercise_choice_id)) ? "choose-answer" : '' %>
|
|
|
|
|
<div class="pbt5 clearfix main-choice">
|
|
|
|
|
<span class="choose-radio <%= check_answer %> pull-left mt8"></span>
|
|
|
|
|
<span class="inline-block pull-left ml10 choice-text"><%= to_markdown(s.choice_text,@request_url) %></span>
|
|
|
|
|
<div class="pbt10 clearfix main-choice">
|
|
|
|
|
<span class="choose-radio <%= check_answer %> pull-left mt10"></span>
|
|
|
|
|
<span class="inline-block pull-left ml10 choice-text mt-2"><%= to_markdown(s.choice_text,@request_url) %></span>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
|
<% elsif q_type == 1 %>
|
|
|
|
|
<% q.exercise_choices.each do |s| %>
|
|
|
|
|
<% check_answer = (user_answer.present? && (user_answer.pluck(:exercise_choice_id).include?(s.id))) ? true : false %>
|
|
|
|
|
<div class="pbt5 clearfix main-choice">
|
|
|
|
|
<div class="pbt10 clearfix main-choice">
|
|
|
|
|
<% if check_answer %>
|
|
|
|
|
<span class="choose-checkbox choose-answer-multi mt8" ></span>
|
|
|
|
|
<span class="choose-checkbox choose-answer-multi mt10 pull-left" ></span>
|
|
|
|
|
<% else %>
|
|
|
|
|
<span class="choose-checkbox pull-left mt8"></span>
|
|
|
|
|
<span class="choose-checkbox pull-left mt10"></span>
|
|
|
|
|
<% end %>
|
|
|
|
|
<span class="inline-block pull-left choice-text ml10"><%= to_markdown(s.choice_text,@request_url) %></span>
|
|
|
|
|
<span class="inline-block pull-left choice-text ml10 mt-2"><%= to_markdown(s.choice_text,@request_url) %></span>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
|
<% elsif q_type == 2 %>
|
|
|
|
|
<div class="pbt5 clearfix">
|
|
|
|
|
<% q.exercise_choices.each do |s| %>
|
|
|
|
@ -212,6 +215,7 @@
|
|
|
|
|
</span>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
|
<% elsif q_type == 3 %>
|
|
|
|
|
<% st_counts = q.exercise_standard_answers.pluck(:exercise_choice_id).uniq %>
|
|
|
|
|
<% st_counts.each_with_index do |s,index| %>
|
|
|
|
@ -220,16 +224,20 @@
|
|
|
|
|
<% else %>
|
|
|
|
|
<% check_answer = "--" %>
|
|
|
|
|
<% end %>
|
|
|
|
|
<p class="pbt10 flex-nowrap">
|
|
|
|
|
<div class="pbt10 flex-nowrap clearfix">
|
|
|
|
|
<span class="pull-left line-34">答案(填空<%= index+1 %>):</span>
|
|
|
|
|
<span class="null-answer"><%= to_markdown(check_answer) %></span>
|
|
|
|
|
</p>
|
|
|
|
|
<span class="null-answer pull-left"><%= to_markdown(check_answer,@request_url) %></span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
|
<% 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"><%= to_markdown(check_answer) %></span>
|
|
|
|
|
</p>
|
|
|
|
|
<div class="flex-nowrap">
|
|
|
|
|
<div class="null-answer main-height">
|
|
|
|
|
<%= to_markdown(check_answer,@request_url) %>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
|
<% else %>
|
|
|
|
|
<div class="mbt10">
|
|
|
|
|
<p class="text-gray mbt10">
|
|
|
|
@ -326,6 +334,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|