diff --git a/lms/djangoapps/django_comment_client/forum/views.py b/lms/djangoapps/django_comment_client/forum/views.py index 32e2117508..3dc1d08b67 100644 --- a/lms/djangoapps/django_comment_client/forum/views.py +++ b/lms/djangoapps/django_comment_client/forum/views.py @@ -83,7 +83,7 @@ def render_discussion(request, course_id, threads, *args, **kwargs): thread['courseware_title'] = courseware_context['courseware_title'] context = { - #'threads': map(utils.safe_content, threads), # TODO Delete, this is redundant with discussion_data + 'threads': map(utils.safe_content, threads), # TODO Delete, this is redundant with discussion_data 'discussion_id': discussion_id, 'user_id': user_id, 'course_id': course_id, @@ -328,6 +328,13 @@ def user_profile(request, course_id, user_id): try: profiled_user = cc.User(id=user_id, course_id=course_id) + query_params = { + 'page': request.GET.get('page', 1), + 'per_page': THREADS_PER_PAGE, # more than threads_per_page to show more activities + } + + threads, page, num_pages = profiled_user.active_threads(query_params) + query_params['page'] = page query_params['num_pages'] = num_pages