dev_forum
SylorHuang 6 years ago
parent 90a6f4d737
commit 5e87e88f56

@ -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.limit 2 #仅导出已提交的,截止后则是全部为提交的。
@ex_users = default_ex_users #仅导出已提交的,截止后则是全部为提交的。
#可以分班选择
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).limit 2
@ex_users = @ex_users.where(user_id: user_ids)
end
default_ex_users_size = @ex_users.size

@ -41,7 +41,7 @@ class ExerciseUserPdfService
# #-----正式需删掉
# aa = File.open(Rails.root.join("public/123.html"),"w+")
# aa.syswrite(kit.source)
# #正式需删掉-------
# #正式需删掉-------s
file = Tempfile.new(filename)
kit.to_pdf(file.path)
file

@ -39,7 +39,7 @@ p{
margin-bottom: 10px;
}
.mt8{
margin-top:8px;
margin-top:7px;
}
.mt10{
margin-top:10px;

Loading…
Cancel
Save