|
|
@ -40,12 +40,12 @@ class ZipsController < ApplicationController
|
|
|
|
def get_exercise
|
|
|
|
def get_exercise
|
|
|
|
ActiveRecord::Base.transaction do
|
|
|
|
ActiveRecord::Base.transaction do
|
|
|
|
begin
|
|
|
|
begin
|
|
|
|
@exercise = Exercise.find_by(id:params[:exercise_id]).includes(:exercise_users)
|
|
|
|
@exercise = Exercise.includes(:exercise_users).find_by(id:params[:exercise_id])
|
|
|
|
group_id = params[:exercise_group_id]
|
|
|
|
group_id = params[:exercise_group_id]
|
|
|
|
if @exercise.blank?
|
|
|
|
if @exercise.blank?
|
|
|
|
normal_status(-1,"试卷不存在")
|
|
|
|
normal_status(-1,"试卷不存在")
|
|
|
|
else
|
|
|
|
else
|
|
|
|
@course = @exercise.course.includes(:course_members)
|
|
|
|
@course = @exercise.course
|
|
|
|
|
|
|
|
|
|
|
|
default_ex_users = @exercise.all_exercise_users(current_user.id).exercise_user_committed
|
|
|
|
default_ex_users = @exercise.all_exercise_users(current_user.id).exercise_user_committed
|
|
|
|
default_ex_users_size = default_ex_users.size
|
|
|
|
default_ex_users_size = default_ex_users.size
|
|
|
|