more refactoring; enabled partial re-rendering for votes, endorse, and closed

This commit is contained in:
Rocky Duan
2012-08-21 15:26:50 -07:00
parent 72e6588be4
commit fdf92d68f6
10 changed files with 229 additions and 216 deletions

View File

@@ -51,7 +51,8 @@ def ajax_content_response(request, course_id, content, template_name):
'content': content,
}
html = render_to_string(template_name, context)
annotated_content_info = utils.get_annotated_content_info(course_id, content, request.user)
user_info = cc.User.from_django_user(request.user).to_dict()
annotated_content_info = utils.get_annotated_content_info(course_id, content, request.user, user_info)
return JsonResponse({
'html': html,
'content': content,