HFP-2654 Add defaultLanguage to exported fields

pull/58/head
Thomas Marstrander 2019-02-21 15:28:04 +01:00
parent 32b0840ca6
commit 801f3f33c3
1 changed files with 1 additions and 1 deletions

View File

@ -1671,7 +1671,7 @@ Class H5PExport {
'embedTypes' => $embedTypes
);
foreach(array('authors', 'source', 'license', 'licenseVersion', 'licenseExtras' ,'yearFrom', 'yearTo', 'changes', 'authorComments') as $field) {
foreach(array('authors', 'source', 'license', 'licenseVersion', 'licenseExtras' ,'yearFrom', 'yearTo', 'changes', 'authorComments', 'defaultLanguage') as $field) {
if (isset($content['metadata'][$field]) && $content['metadata'][$field] !== '') {
if (($field !== 'authors' && $field !== 'changes') || (count($content['metadata'][$field]) > 0)) {
$h5pJson[$field] = json_decode(json_encode($content['metadata'][$field], TRUE));