def ajax_content_response(request, course_key, content): 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, })
def ajax_content_response(request, course_id, content): user_info = cc.User.from_django_user(request.user).to_dict() annotated_content_info = get_annotated_content_info(course_id, content, request.user, user_info) return JsonResponse({ 'content': safe_content(content), 'annotated_content_info': annotated_content_info, })
def ajax_content_response(request, course_id, content): 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({ 'content': utils.safe_content(content), 'annotated_content_info': annotated_content_info, })
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} )
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, })
def ajax_content_response(request, course_id, content, template_name): context = { 'course_id': course_id, 'content': content, } html = render_to_string(template_name, context) 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': utils.safe_content(content), 'annotated_content_info': annotated_content_info, })
def ajax_content_response(request, course_key, content): 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": safe_content(content, course_key), "annotated_content_info": annotated_content_info} )
def ajax_content_response(request, course_id, content): context = {"course_id": course_id, "content": content} 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({"content": utils.safe_content(content), "annotated_content_info": annotated_content_info})