From ab34fec172b0b4e1bb971e0e0ee9e7e050c9ec3d Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 8 Apr 2016 21:30:59 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B5=84=E6=BA=90=E5=AF=BC=E5=85=A5=E7=9A=84?= =?UTF-8?q?=E6=97=B6=E5=80=99=E8=AE=B0=E6=95=B0=E6=B2=A1=E6=9C=89=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=A2=9E=E5=8A=A0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index e59e33516..b53564101 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -2733,6 +2733,10 @@ class UsersController < ApplicationController attach_copied_obj.attachtype = 4 end attach_copied_obj.save + # 附件保存成功后更新项目和课程的统计数 + if params[:mul_type] == "Project" + mul_container.project_score.update_attribute(:attach_num, mul_container.project_score.attach_num + 1) unless mul_container.project_score.nil? + end @save_message = attach_copied_obj.errors.full_messages end end