diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb index f4b18fad2..98af25b7d 100644 --- a/app/controllers/shixuns_controller.rb +++ b/app/controllers/shixuns_controller.rb @@ -987,11 +987,12 @@ class ShixunsController < ApplicationController end # 创建实训审核 - def review_shixuns + def review_shixun validate_review_shixun_params # 没有记录就创建记录, 如果有记录就 @shixun.shixun_reviews.create!(user_id: current_user.id, status: params[:status], review_type: params[:review_type], evaluate_content: params[:evaluate_content]) + normal_status("审核完成") end # 实训审核最新记录 diff --git a/config/routes.rb b/config/routes.rb index ab2c1addd..c395614c8 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -221,7 +221,7 @@ Rails.application.routes.draw do get :cancel_publish get :publish get :shixun_exec - post :review_shixuns + post :review_shixun get :review_newest_record end