试卷的批量导出html和css的修改

dev_forum
SylorHuang 6 years ago
parent fa65d94dbd
commit 08a4a0d89b

@ -49,12 +49,12 @@ class ZipsController < ApplicationController
@course = @exercise.course
default_ex_users = @exercise.all_exercise_users(current_user.id).exercise_user_committed
@ex_users = default_ex_users #仅导出已提交的,截止后则是全部为提交的。
@ex_users = default_ex_users.limit 2 #仅导出已提交的,截止后则是全部为提交的。
#可以分班选择
if group_id.present?
exercise_students = @course.students.where(course_group_id: group_id) # 试卷所分班的全部人数
user_ids = exercise_students.pluck(:user_id).reject(&:blank?).uniq
@ex_users = @ex_users.where(user_id: user_ids)
@ex_users = @ex_users.where(user_id: user_ids).limit 2
end
default_ex_users_size = @ex_users.size

@ -220,10 +220,10 @@
<% else %>
<% check_answer = "--" %>
<% end %>
<p class="pbt10 flex-nowrap">
<span class="pull-left line-34">答案(填空<%= index+1 %></span>
<span class="null-answer"><%= to_markdown(check_answer,@request_url) %></span>
</p>
<div class="pbt10 flex-nowrap clearfix">
<div class="pull-left line-34">答案(填空<%= index+1 %></div>
<div class="null-answer pull-left"><%= to_markdown(check_answer,@request_url) %></div>
</div>
<% end %>
<% elsif q_type == 4 %>
<% check_answer = (user_answer.present? ? user_answer.first.answer_text : '--') %>

Loading…
Cancel
Save