diff --git a/app/controllers/zips_controller.rb b/app/controllers/zips_controller.rb index c20546701..51761d023 100644 --- a/app/controllers/zips_controller.rb +++ b/app/controllers/zips_controller.rb @@ -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 diff --git a/app/templates/exercise_export/exercise_user.html.erb b/app/templates/exercise_export/exercise_user.html.erb index 1e3d88a44..62d2132ce 100644 --- a/app/templates/exercise_export/exercise_user.html.erb +++ b/app/templates/exercise_export/exercise_user.html.erb @@ -220,10 +220,10 @@ <% else %> <% check_answer = "--" %> <% end %> -

- 答案(填空<%= index+1 %>): - <%= to_markdown(check_answer,@request_url) %> -

+
+
答案(填空<%= index+1 %>):
+
<%= to_markdown(check_answer,@request_url) %>
+
<% end %> <% elsif q_type == 4 %> <% check_answer = (user_answer.present? ? user_answer.first.answer_text : '--') %>