Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_forum
daiao 5 years ago
commit d1548ff04f

@ -1173,7 +1173,7 @@ class ExercisesController < ApplicationController
ActiveRecord::Base.transaction do
begin
@current_user_id = current_user.id
@exercise = @exercise.includes(:exercise_questions)
@exercise = @exercise
exercise_ids = [@exercise.id]
@exercise_status = @exercise.get_exercise_status(current_user.id)
@course_all_members = @course.students
@ -1297,7 +1297,7 @@ class ExercisesController < ApplicationController
if @user_course_identity > Course::ASSISTANT_PROFESSOR
tip_exception(403,"无权限操作")
else
if @exercise_users_size.size > 0
if @exercise_users_size == 0
normal_status(-1,"暂无用户提交")
else
get_export_users(@exercise,@course,@export_ex_users)

@ -924,7 +924,7 @@ class PollsController < ApplicationController
# 全部页面,需返回
# @poll_questions_count = @poll_questions.size
# 分页
@poll = @poll.includes(:poll_users,user: :user_extension,)
# @poll = @poll.includes(:poll_users,user: :user_extension)
@poll_users = @poll.poll_users
@poll_commit_ids = @poll_users.commit_by_status(1).pluck(:user_id) #问卷提交用户的id
@page = params[:page] || 1

@ -62,7 +62,7 @@ class ZipsController < ApplicationController
if default_ex_users_size == 0
normal_status(-1,"导出失败,暂时没有已提交的学生")
elsif default_ex_users_size > 100
normal_status(-1,"导出数量超过100,请分班导出或联系网站管理员导出")
normal_status(-2,"100")
end
end
rescue Exception => e

Loading…
Cancel
Save