diff --git a/lms/djangoapps/django_comment_client/forum/views.py b/lms/djangoapps/django_comment_client/forum/views.py index b8991a86d6..5eb9582f90 100644 --- a/lms/djangoapps/django_comment_client/forum/views.py +++ b/lms/djangoapps/django_comment_client/forum/views.py @@ -79,7 +79,7 @@ def get_threads(request, course_id, discussion_id=None, per_page=THREADS_PER_PAG query_params = merge_dict(default_query_params, strip_none(extract(request.GET, ['page', 'sort_key', 'sort_order', 'text', 'tags', 'commentable_ids']))) - + threads, page, num_pages = cc.Thread.search(query_params) query_params['page'] = page @@ -248,6 +248,7 @@ def single_thread(request, course_id, discussion_id, thread_id): 'threads': saxutils.escape(json.dumps(threads), escapedict), 'category_map': category_map, 'roles': saxutils.escape(json.dumps(utils.get_role_ids(course_id)), escapedict), + 'thread_pages': query_params['num_pages'], } return render_to_response('discussion/single_thread.html', context) diff --git a/lms/templates/discussion/single_thread.html b/lms/templates/discussion/single_thread.html index 0cc1f28b24..9ec05b1534 100644 --- a/lms/templates/discussion/single_thread.html +++ b/lms/templates/discussion/single_thread.html @@ -24,7 +24,7 @@ <%include file="_new_post.html" /> -
+