作品消息状态更新
This commit is contained in:
parent
8d72a9a539
commit
4c73e00eaf
|
@ -67,13 +67,14 @@ class StudentWorkController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def index
|
def index
|
||||||
# 消息状态更新
|
# 作业消息状态更新
|
||||||
@homework.course_messages.each do |homework_message|
|
@homework.course_messages.each do |homework_message|
|
||||||
if User.current.id == homework_message.user_id
|
if User.current.id == homework_message.user_id
|
||||||
homework_message.update_attributes(:viewed => true)
|
homework_message.update_attributes(:viewed => true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
# 作品消息状态更新
|
||||||
|
|
||||||
# 消息end
|
# 消息end
|
||||||
#设置作业对应的forge_messages表的viewed字段
|
#设置作业对应的forge_messages表的viewed字段
|
||||||
query_student_work = @homework.course_messages
|
query_student_work = @homework.course_messages
|
||||||
|
|
Loading…
Reference in New Issue