parent
bdf60a943d
commit
bfda796ab7
|
@ -557,7 +557,7 @@ interface H5PFrameworkInterface {
|
||||||
/**
|
/**
|
||||||
* Will trigger after the export file is created.
|
* Will trigger after the export file is created.
|
||||||
*/
|
*/
|
||||||
public function afterExportCreated();
|
public function afterExportCreated($content, $filename);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if user has permissions to an action
|
* Check if user has permissions to an action
|
||||||
|
@ -1600,9 +1600,10 @@ Class H5PExport {
|
||||||
$zip->close();
|
$zip->close();
|
||||||
H5PCore::deleteFileTree($tmpPath);
|
H5PCore::deleteFileTree($tmpPath);
|
||||||
|
|
||||||
|
$filename = $content['slug'] . '-' . $content['id'] . '.h5p';
|
||||||
try {
|
try {
|
||||||
// Save export
|
// Save export
|
||||||
$this->h5pC->fs->saveExport($tmpFile, $content['slug'] . '-' . $content['id'] . '.h5p');
|
$this->h5pC->fs->saveExport($tmpFile, $filename);
|
||||||
}
|
}
|
||||||
catch (Exception $e) {
|
catch (Exception $e) {
|
||||||
$this->h5pF->setErrorMessage($this->h5pF->t($e->getMessage()));
|
$this->h5pF->setErrorMessage($this->h5pF->t($e->getMessage()));
|
||||||
|
@ -1610,7 +1611,7 @@ Class H5PExport {
|
||||||
}
|
}
|
||||||
|
|
||||||
unlink($tmpFile);
|
unlink($tmpFile);
|
||||||
$this->h5pF->afterExportCreated();
|
$this->h5pF->afterExportCreated($content, $filename);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue