def ajax_content_response(request, course_key, content): """ Standard AJAX response returning the content hierarchy of the current thread. """ user_info = cc.User.from_django_user(request.user).to_dict() annotated_content_info = get_annotated_content_info(course_key, content, request.user, user_info) return JsonResponse({ 'content': prepare_content(content, course_key), 'annotated_content_info': annotated_content_info, })