diff --git a/lms/djangoapps/django_comment_client/forum/views.py b/lms/djangoapps/django_comment_client/forum/views.py index d517f67185..5b643f3920 100644 --- a/lms/djangoapps/django_comment_client/forum/views.py +++ b/lms/djangoapps/django_comment_client/forum/views.py @@ -4,6 +4,7 @@ from django.http import HttpResponse from django.utils import simplejson from django.core.context_processors import csrf from django.core.urlresolvers import reverse +from django.contrib.auth.models import User from mitxmako.shortcuts import render_to_response, render_to_string from courseware.courses import check_course @@ -167,7 +168,7 @@ def single_thread(request, course_id, discussion_id, thread_id): thread = cc.Thread.find(thread_id).retrieve(recursive=True) annotated_content_info = utils.get_annotated_content_infos(course_id, thread, request.user, type='thread') - context = {'thread': thread.to_dict()} + context = {'thread': thread.to_dict(), 'course_id': course_id} html = render_to_string('discussion/_ajax_single_thread.html', context) return utils.JsonResponse({ @@ -185,6 +186,7 @@ def single_thread(request, course_id, discussion_id, thread_id): 'content': render_single_thread(request, discussion_id, course_id, thread_id), 'accordion': render_accordion(request, course, discussion_id), 'course': course, + 'course_id': course.id, } return render_to_response('discussion/index.html', context) @@ -198,9 +200,8 @@ def user_profile(request, course_id, user_id): context = { 'course': course, 'user': request.user, + 'django_user': User.objects.get(id=user_id), 'discussion_user': discussion_user.to_dict(), } - print context - return render_to_response('discussion/user_profile.html', context) diff --git a/lms/templates/discussion/_thread.html b/lms/templates/discussion/_thread.html index 593aa1e4f4..1bc732dfa6 100644 --- a/lms/templates/discussion/_thread.html +++ b/lms/templates/discussion/_thread.html @@ -115,6 +115,7 @@ <%def name="render_info(content)"> <% def url_for_user(user_id): + import pdb; pdb.set_trace() return reverse('django_comment_client.forum.views.user_profile', args=[course_id, user_id]) %>