@require_http_methods('GET')
@login_required
@expect_json
def xblock_outline_handler(request, usage_key_string):
 usage_key = usage_key_with_run(usage_key_string)
 if (not has_studio_read_access(request.user, usage_key.course_key)):
  raise PermissionDenied()
 response_format = request.GET.get('format', 'html')
 if ((response_format == 'json') or ('application/json' in request.META.get('HTTP_ACCEPT', 'application/json'))):
  store = modulestore()
  with store.bulk_operations(usage_key.course_key):
   root_xblock = store.get_item(usage_key, depth=None)
   return JsonResponse(create_xblock_info(root_xblock, include_child_info=True, course_outline=True, include_children_predicate=(lambda xblock: (not (xblock.category == 'vertical')))))
 else:
  return Http404

@ require_http_methods ( 'GET' ) @ login_required @ expect_json def xblock_outline_handler ( request , usage_key_string ) : usage_key = usage_key_with_run ( usage_key_string ) if ( not has_studio_read_access ( request . user , usage_key . course_key ) ) : raise PermissionDenied ( ) response_format = request . GET . get ( 'format' , 'html' ) if ( ( response_format == 'json' ) or ( 'application/json' in request . META . get ( 'HTTP_ACCEPT' , 'application/json' ) ) ) : store = modulestore ( ) with store . bulk_operations ( usage_key . course_key ) : root_xblock = store . get_item ( usage_key , depth = None ) return JsonResponse ( create_xblock_info ( root_xblock , include_child_info = True , course_outline = True , include_children_predicate = ( lambda xblock : ( not ( xblock . category == 'vertical' ) ) ) ) ) else : return Http404
the restful handler for requests for xblock information about the block and its children .