dev_forum
SylorHuang 5 years ago
parent dfe784a051
commit 8768f4cb23

@ -1291,13 +1291,15 @@ class ExercisesController < ApplicationController
@page = params[:page] || 1
@limit = params[:limit] || 20
@exercise_users_list = @exercise_users_list.page(@page).per(@limit)
logger.info("#######___________@exercise_users_size_________##################{@exercise_users_size}")
logger.info("#######__________@export_ex_users&.exercise_user_committed.size_________##################{@export_ex_users&.exercise_user_committed.size}")
respond_to do |format|
format.json
format.xlsx{
if @user_course_identity > Course::ASSISTANT_PROFESSOR
tip_exception(403,"无权限操作")
else
if (@exercise_users_size == 0) ||( @export_ex_users&.exercise_user_committed.size == 0)
if (@exercise_users_size == 0) || ( @export_ex_users&.exercise_user_committed.size == 0)
normal_status(-1,"暂无用户提交")
else
get_export_users(@exercise,@course,@export_ex_users)
@ -1316,9 +1318,6 @@ class ExercisesController < ApplicationController
format.xlsx{
normal_status(-1,"暂无用户提交")
}
format.zip{
normal_status(-1,"暂无用户提交")
}
end
end

Loading…
Cancel
Save