/** * Delete a local resource. */ function deleteResource($slug) { remotesync\H5pUtil::deleteH5p($slug); }
/** * Update a H5P content on the system. It is assumed that * a H5P content with the same slug already exists on the * system to be replaced. If there is no existing content * with the given slug, an error will be generated. */ static function updateH5p($slug, $h5pFileName, $title) { if (!H5pUtil::h5pExists($slug)) { throw new Exception("H5P not found: " . $slug); } H5pUtil::deleteH5p($slug); H5pUtil::insertH5p($slug, $h5pFileName, $title); }