'XBlock handler that wraps `handle_ajax`'

@XBlock.handler
def xmodule_handler(self, request, suffix=None):

    class FileObjForWebobFiles(object, ):
        '\n                                                Turn    Webob    cgi.FieldStorage    uploaded    files    into    pure    file    objects.\n\n                                                Webob    represents    uploaded    files    as    cgi.FieldStorage    objects,    which\n                                                have    a    .file    attribute.        We    wrap    the    FieldStorage    object,    delegating\n                                                attribute    access    to    the    .file    attribute.        But    the    files    have    no\n                                                name,    so    we    carry    the    FieldStorage    .filename    attribute    as    the    .name.\n\n                                                '
        def __init__(self, webob_file):
            self.file = webob_file.file
            self.name = webob_file.filename
        def __getattr__(self, name):
            return getattr(self.file, name)
    request_post = MultiDict(request.POST)
    for key in set(request.POST.iterkeys()):
        if hasattr(request.POST[key], 'file'):
            request_post[key] = map(FileObjForWebobFiles, request.POST.getall(key))
    response_data = self.handle_ajax(suffix, request_post)
    return Response(response_data, content_type='application/json')
