diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index e9b420343..ca897fc3d 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -545,6 +545,13 @@ class UsersController < ApplicationController end def show + #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') + @user_activities = paginateHelper @user_activities,500 + #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_homework.html.erb b/app/views/users/_course_homework.html.erb new file mode 100644 index 000000000..6eeae66f9 --- /dev/null +++ b/app/views/users/_course_homework.html.erb @@ -0,0 +1,39 @@ +