|
|
|
@ -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>分
|
|
|
|
@ -59,7 +58,7 @@
|
|
|
|
|
<div class="mbt10">
|
|
|
|
|
<% @exercise_questions.each do |q| %>
|
|
|
|
|
<div class="bdc">
|
|
|
|
|
<div class="pbt10">
|
|
|
|
|
<div class="pbt5">
|
|
|
|
|
<div class="pbt5">
|
|
|
|
|
<span class="mr5 text-blue"><%= q.question_number %>、</span>
|
|
|
|
|
<span class="text-blue">
|
|
|
|
@ -68,45 +67,39 @@
|
|
|
|
|
<span class="text-gray mlr5">(<%= q&.question_score %>分)</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="pbt5">
|
|
|
|
|
<img src="http://47.96.87.25:48080/api/attachments/368984" alt="电脑的电路图" title="电脑的电路图">
|
|
|
|
|
<img class="myavatar avatar-48" alt="udasker_picture" src="http://images.udask.cn/uploaders/user/picture/2/2_udasker.jpg?v=1556452947">
|
|
|
|
|
<% q_markdown = to_markdown(q.question_title) %>
|
|
|
|
|
<% if q.question_type == 5 %>
|
|
|
|
|
<% q_markdown_name = to_markdown(q.shixun_name) %>
|
|
|
|
|
<span class="ques-title" ><%= q_markdown_name %></span>
|
|
|
|
|
<span class="ques-title" ><%= to_markdown(q.shixun_name,@request_url) %></span>
|
|
|
|
|
<div class="mt8 text-gray">
|
|
|
|
|
<span><%= q_markdown %></span>
|
|
|
|
|
<span><%= to_markdown(q.question_title,@request_url) %></span>
|
|
|
|
|
</div>
|
|
|
|
|
<% else %>
|
|
|
|
|
<span class="ques-title"><%= q_markdown %></span>
|
|
|
|
|
<span class="ques-title"><%= to_markdown(q.question_title,@request_url) %></span>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="pbt5">
|
|
|
|
|
<% if q.question_type == 0 %>
|
|
|
|
|
<% q.exercise_choices.each_with_index do |s,index| %>
|
|
|
|
|
<p class="pbt5">
|
|
|
|
|
<span class="choose-radio"></span>
|
|
|
|
|
<span class="mr15"><%= convert_to_char((index+1).to_s)%></span>
|
|
|
|
|
<span class="inline-block"><%= to_markdown(s.choice_text) %></span>
|
|
|
|
|
</p>
|
|
|
|
|
<% q.exercise_choices.each do |s| %>
|
|
|
|
|
<div class="pbt5 clearfix main-choice">
|
|
|
|
|
<span class="choose-radio pull-left mt8"></span>
|
|
|
|
|
<span class="inline-block pull-left choice-text ml10"><%= to_markdown(s.choice_text,@request_url) %></span>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% elsif q.question_type == 1 %>
|
|
|
|
|
<% q.exercise_choices.each_with_index do |s,index| %>
|
|
|
|
|
<p class="pbt5">
|
|
|
|
|
<span class="choose-checkbox"></span>
|
|
|
|
|
<span class="mr20"><%= convert_to_char((index+1).to_s)%></span>
|
|
|
|
|
<span class="inline-block"><%= to_markdown(s.choice_text) %></span>
|
|
|
|
|
</p>
|
|
|
|
|
<% q.exercise_choices.each do |s| %>
|
|
|
|
|
<div class="pbt5 clearfix main-choice">
|
|
|
|
|
<span class="choose-checkbox pull-left mt8"></span>
|
|
|
|
|
<span class="inline-block pull-left choice-text ml10"><%= to_markdown(s.choice_text,@request_url) %></span>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% elsif q.question_type == 2 %>
|
|
|
|
|
<p class="pbt5">
|
|
|
|
|
<% q.exercise_choices.each_with_index do |s,index| %>
|
|
|
|
|
<span class="mr15">
|
|
|
|
|
<span class="choose-radio"></span>
|
|
|
|
|
<span class="mlr5 inline-block"><%= to_markdown(s.choice_text) %></span>
|
|
|
|
|
<div class="pbt5 clearfix">
|
|
|
|
|
<% q.exercise_choices.each do |s| %>
|
|
|
|
|
<span class="mr15 clearfix">
|
|
|
|
|
<span class="choose-radio "></span>
|
|
|
|
|
<span class="mlr5 inline-block"><%= s.choice_text %></span>
|
|
|
|
|
</span>
|
|
|
|
|
<% end %>
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
<% elsif q.question_type == 3 %>
|
|
|
|
|
<% st_counts = q.exercise_standard_answers.pluck(:exercise_choice_id).uniq %>
|
|
|
|
|
<% st_counts.each_with_index do |s,index| %>
|
|
|
|
|