|
|
|
@ -1,9 +1,9 @@
|
|
|
|
|
class ExaminationBanksController < ApplicationController
|
|
|
|
|
include PaginateHelper
|
|
|
|
|
before_action :require_login
|
|
|
|
|
before_action :certi_identity_auth, only: [:create, :edit, :update, :destroy, :set_public, :revoke_item]
|
|
|
|
|
before_action :find_exam, except: [:index, :create]
|
|
|
|
|
before_action :edit_auth, only: [:update, :destroy, :set_public, :revoke_item]
|
|
|
|
|
before_action :certi_identity_auth, only: [:create, :edit, :update, :destroy, :set_public, :revoke_item, :cancel_items]
|
|
|
|
|
before_action :find_exam, except: [:index, :create, :cancel_items]
|
|
|
|
|
before_action :edit_auth, only: [:update, :destroy, :set_public, :revoke_item, :cancel_items]
|
|
|
|
|
before_action :identity_auth, only: [:index]
|
|
|
|
|
|
|
|
|
|
def index
|
|
|
|
@ -76,6 +76,11 @@ class ExaminationBanksController < ApplicationController
|
|
|
|
|
render_ok
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def cancel_items
|
|
|
|
|
current_user.item_baskets.where(item_bank_id: params[:item_ids]).destroy_all
|
|
|
|
|
render_ok
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
|
|
def form_params
|
|
|
|
|