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

* 'dev_chen' of https://bdgit.educoder.net/Hjqreturn/educoder:
  调整
  删除试卷报错
dev_chen
harry 5 years ago
commit 353dd13024

@ -52,7 +52,7 @@ class ExaminationBanksController < ApplicationController
end
def destroy
tip_exception(403, "无权限") unless current_user.admin? || @item.user == current_user
tip_exception(403, "无权限") unless current_user.admin? || @exam.user == current_user
ActiveRecord::Base.transaction do
ApplyAction.where(container_type: "ExaminationBank", container_id: @exam.id).destroy_all
@exam.destroy!

@ -137,7 +137,7 @@ class ExercisesController < ApplicationController
:course_id => @course.id,
:time => -1,
:exercise_status => 1,
:is_md => params[:md]
:is_md => params[:is_md]
}
@exercise = Exercise.create!(exercise_options)
end

Loading…
Cancel
Save