code: def get_app(config):
      
      mongo_client = MongoClient(host=config.get('mongo_opt', {}).get('host', 'localhost'))
      database = mongo_client[config.get('mongo_opt', {}).get('database', 'INGInious')]
  
      # Create the FS provider
      if "tasks_directory" not in config:
          raise RuntimeError("WebDav access is only supported if INGInious is using a local filesystem to access tasks")
  
      fs_provider = LocalFSProvider(config["tasks_directory"])
      course_factory, task_factory = create_factories(fs_provider, {}, None, WebAppCourse, WebAppTask)
      user_manager = UserManager(MongoStore(database, 'sessions'), database, config.get('superadmins', []))
  
      config = dict(wsgidav_app.DEFAULT_CONFIG)
      config["provider_mapping"] = {"/": INGIniousFilesystemProvider(course_factory, task_factory)}
      config["domaincontroller"] = INGIniousDAVDomainController(user_manager, course_factory)
      config["verbose"] = 0
  
      app = wsgidav_app.WsgiDAVApp(config)
  
      return app
docs: Init the webdav app