From 3d9dcfe25045f3b1666b867fadb8d06aaf9ae10d Mon Sep 17 00:00:00 2001 From: cxt Date: Tue, 29 Sep 2015 10:49:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E7=9A=84=E6=9C=80=E5=90=8E?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=97=B6=E9=97=B4=E4=B8=BA=E4=BD=9C=E5=93=81?= =?UTF-8?q?=E7=9A=84=E6=9C=80=E6=96=B0=E6=8F=90=E4=BA=A4=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/student_work_controller.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index 2d7bf02b1..d39d8fe3b 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -173,6 +173,12 @@ class StudentWorkController < ApplicationController end if student_work.save + course_activity = CourseActivity.where("course_act_type='HomeworkCommon' and course_act_id =#{@homework.id}").first + course_activity.updated_at = Time.now + course_activity.save + user_activity = UserActivity.where("act_type='HomeworkCommon' and act_id =#{@homework.id}").first + user_activity.updated_at = Time.now + user_activity.save respond_to do |format| format.html { flash[:notice] = l(:notice_successful_create)