diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb index 59dd20633..bb475abcd 100644 --- a/app/controllers/shixuns_controller.rb +++ b/app/controllers/shixuns_controller.rb @@ -467,7 +467,13 @@ class ShixunsController < ApplicationController def update_learn_setting begin ActiveRecord::Base.transaction do - @shixun.update_attributes!(shixun_params.merge(vnc_evaluate: 1)) + update_params = + if params[:shixun][:vnc] + shixun_params.merge(vnc_evaluate: 1) + else + shixun_params + end + @shixun.update_attributes!(update_params) end rescue => e uid_logger_error("实训学习页面设置失败--------#{e.message}")