更新用户申请成为课程的老师或教辅消息的状态
This commit is contained in:
parent
6924a3e7bb
commit
586cde6f87
|
@ -918,6 +918,9 @@ class UsersController < ApplicationController
|
|||
end
|
||||
|
||||
def show
|
||||
#更新用户申请成为课程老师或教辅消息的状态
|
||||
join_course_messages = CourseMessage.where("course_message_type =? and course_message_id =? and viewed =?", 'JoinCourseRequest', @user.id, false)
|
||||
join_course_messages.update_all(:viewed => true)
|
||||
@page = params[:page] ? params[:page].to_i + 1 : 0
|
||||
user_project_ids = @user.projects.visible.empty? ? "(-1)" : "(" + @user.projects.visible.map{|project| project.id}.join(",") + ")"
|
||||
user_course_ids = @user.courses.visible.empty? ? "(-1)" : "(" + @user.courses.visible.map{|course| course.id}.join(",") + ")"
|
||||
|
|
Loading…
Reference in New Issue