Commit 324d55b9 by Carlos Andrés Rocha

Temporary fix to get the discussion profile page rendering

parent eae9c268
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment