diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 2e3ec769d..e6e4f96d7 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -534,12 +534,13 @@ class UsersController < ApplicationController end def show - if @user == User.current + #if @user == User.current + @user_activities = UserActivity.where("(container_type='Course' and container_id in (select course_id FROM members WHERE user_id=#{@user.id})) or (container_type='Project' and container_id in (SELECT project_id FROM members WHERE user_id=#{@user.id}))").order('created_at desc') -=begin - SELECT * FROM user_activities WHERE (container_type='Course' AND container_id IN (SELECT course_id FROM members WHERE user_id=4)) OR (container_type='Project' AND container_id IN (SELECT project_id FROM members WHERE user_id=4)) -=end - end + + #SELECT * FROM user_activities WHERE (container_type='Course' AND container_id IN (SELECT course_id FROM members WHERE user_id=4)) OR (container_type='Project' AND container_id IN (SELECT project_id FROM members WHERE user_id=4)) + #else + #end render :layout=>'new_base_user' end diff --git a/app/views/users/_course_news.html.erb b/app/views/users/_course_news.html.erb new file mode 100644 index 000000000..f57e05e34 --- /dev/null +++ b/app/views/users/_course_news.html.erb @@ -0,0 +1,36 @@ +