|
|
@ -1329,8 +1329,6 @@ class ExercisesController < ApplicationController
|
|
|
|
@exercise_all_users = @exercise.exercise_users
|
|
|
|
@exercise_all_users = @exercise.exercise_users
|
|
|
|
ex_common_ids = @exercise.common_published_ids(current_user.id)
|
|
|
|
ex_common_ids = @exercise.common_published_ids(current_user.id)
|
|
|
|
@exercise_course_groups = @course.get_ex_published_course(ex_common_ids)
|
|
|
|
@exercise_course_groups = @course.get_ex_published_course(ex_common_ids)
|
|
|
|
@exercise_users_list = @exercise.all_exercise_users(current_user.id)
|
|
|
|
|
|
|
|
@course_all_members_count = @exercise_users_list.size
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#班级的选择
|
|
|
|
#班级的选择
|
|
|
|
if params[:exercise_group_id].present?
|
|
|
|
if params[:exercise_group_id].present?
|
|
|
@ -1338,6 +1336,10 @@ class ExercisesController < ApplicationController
|
|
|
|
exercise_students = @course_all_members.course_find_by_ids("course_group_id",group_id) # 试卷所分班的全部人数
|
|
|
|
exercise_students = @course_all_members.course_find_by_ids("course_group_id",group_id) # 试卷所分班的全部人数
|
|
|
|
user_ids = exercise_students.pluck(:user_id).reject(&:blank?)
|
|
|
|
user_ids = exercise_students.pluck(:user_id).reject(&:blank?)
|
|
|
|
@exercise_all_users = @exercise.exercise_users.exercise_commit_users(user_ids)
|
|
|
|
@exercise_all_users = @exercise.exercise_users.exercise_commit_users(user_ids)
|
|
|
|
|
|
|
|
@course_all_members_count = @exercise_all_users.size
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
@exercise_users_list = @exercise.all_exercise_users(current_user.id)
|
|
|
|
|
|
|
|
@course_all_members_count = @exercise_users_list.size
|
|
|
|
end
|
|
|
|
end
|
|
|
|
@exercise_commit_users = @exercise_all_users.commit_exercise_by_status(1) #试卷的已提交用户
|
|
|
|
@exercise_commit_users = @exercise_all_users.commit_exercise_by_status(1) #试卷的已提交用户
|
|
|
|
@exercise_commit_user_ids = @exercise_commit_users.pluck(:user_id).uniq #已提交试卷的全部用户id
|
|
|
|
@exercise_commit_user_ids = @exercise_commit_users.pluck(:user_id).uniq #已提交试卷的全部用户id
|
|
|
|