|
|
@ -163,11 +163,15 @@ class MessagesController < ApplicationController
|
|
|
|
# @reply.reply_id = params[:id]
|
|
|
|
# @reply.reply_id = params[:id]
|
|
|
|
@topic.children << @reply
|
|
|
|
@topic.children << @reply
|
|
|
|
course_activity = CourseActivity.where("course_act_type='Message' and course_act_id =#{@topic.id}").first
|
|
|
|
course_activity = CourseActivity.where("course_act_type='Message' and course_act_id =#{@topic.id}").first
|
|
|
|
course_activity.updated_at = Time.now
|
|
|
|
if course_activity
|
|
|
|
course_activity.save
|
|
|
|
course_activity.updated_at = Time.now
|
|
|
|
|
|
|
|
course_activity.save
|
|
|
|
|
|
|
|
end
|
|
|
|
user_activity = UserActivity.where("act_type='Message' and act_id =#{@topic.id}").first
|
|
|
|
user_activity = UserActivity.where("act_type='Message' and act_id =#{@topic.id}").first
|
|
|
|
user_activity.updated_at = Time.now
|
|
|
|
if user_activity
|
|
|
|
user_activity.save
|
|
|
|
user_activity.updated_at = Time.now
|
|
|
|
|
|
|
|
user_activity.save
|
|
|
|
|
|
|
|
end
|
|
|
|
#@topic.update_attribute(:updated_on, Time.now)
|
|
|
|
#@topic.update_attribute(:updated_on, Time.now)
|
|
|
|
if !@reply.new_record?
|
|
|
|
if !@reply.new_record?
|
|
|
|
if params[:asset_id]
|
|
|
|
if params[:asset_id]
|
|
|
|