|
|
@ -102,7 +102,9 @@ class MessagesController < ApplicationController
|
|
|
|
return normal_status(403, "您没有权限进行该操作") if current_user != @message.author && !current_user.teacher_of_course?(@message.board.course)
|
|
|
|
return normal_status(403, "您没有权限进行该操作") if current_user != @message.author && !current_user.teacher_of_course?(@message.board.course)
|
|
|
|
|
|
|
|
|
|
|
|
begin
|
|
|
|
begin
|
|
|
|
@message.update_attributes(message_params)
|
|
|
|
h = {is_md: true}
|
|
|
|
|
|
|
|
m_params = message_params.merge(h)
|
|
|
|
|
|
|
|
@message.update_attributes(m_params)
|
|
|
|
Attachment.associate_container(params[:attachment_ids], @message.id, @message.class.name)
|
|
|
|
Attachment.associate_container(params[:attachment_ids], @message.id, @message.class.name)
|
|
|
|
@message.update_content(params[:content])
|
|
|
|
@message.update_content(params[:content])
|
|
|
|
rescue Exception => e
|
|
|
|
rescue Exception => e
|
|
|
|