Make sure we only use camel case in the H5P php library
parent
99ee7a47ae
commit
f98cce49a6
|
@ -234,11 +234,11 @@ interface H5PFrameworkInterface {
|
||||||
* 'title' => string,
|
* 'title' => string,
|
||||||
* 'contentId' => string/int,
|
* 'contentId' => string/int,
|
||||||
* 'mainLibrary' => string (machine name for main library),
|
* 'mainLibrary' => string (machine name for main library),
|
||||||
* 'embed_type' => string,
|
* 'embedType' => string,
|
||||||
* 'libraries' => array(
|
* 'libraries' => array(
|
||||||
* 'machine_name' => string,
|
* 'machineName' => string,
|
||||||
* 'major_version' => int,
|
* 'majorVersion' => int,
|
||||||
* 'minor_version' => int,
|
* 'minorVersion' => int,
|
||||||
* 'preloaded' => int(0|1),
|
* 'preloaded' => int(0|1),
|
||||||
* 'language' => string,
|
* 'language' => string,
|
||||||
*/
|
*/
|
||||||
|
@ -284,27 +284,27 @@ Class H5PExport {
|
||||||
$this->h5pC->copyTree($h5pDir . 'content' . DIRECTORY_SEPARATOR . $exports['contentId'], $tempPath . DIRECTORY_SEPARATOR . 'content');
|
$this->h5pC->copyTree($h5pDir . 'content' . DIRECTORY_SEPARATOR . $exports['contentId'], $tempPath . DIRECTORY_SEPARATOR . 'content');
|
||||||
// Copies libraries to temp dir and create mention in h5p.json
|
// Copies libraries to temp dir and create mention in h5p.json
|
||||||
foreach($exports['libraries'] as $library) {
|
foreach($exports['libraries'] as $library) {
|
||||||
$source = $h5pDir . 'libraries' . DIRECTORY_SEPARATOR . $library['machine_name'] . '-' . $library['major_version'] . '.' . $library['minor_version'];
|
$source = $h5pDir . 'libraries' . DIRECTORY_SEPARATOR . $library['machineName'] . '-' . $library['majorVersion'] . '.' . $library['minorVersion'];
|
||||||
$destination = $tempPath . DIRECTORY_SEPARATOR . $library['machine_name'];
|
$destination = $tempPath . DIRECTORY_SEPARATOR . $library['machineName'];
|
||||||
$this->h5pC->copyTree($source, $destination);
|
$this->h5pC->copyTree($source, $destination);
|
||||||
|
|
||||||
// Set preloaded and dynamic dependencies
|
// Set preloaded and dynamic dependencies
|
||||||
if ($library['preloaded']) {
|
if ($library['preloaded']) {
|
||||||
$preloadedDependencies[] = array(
|
$preloadedDependencies[] = array(
|
||||||
'machineName' => $library['machine_name'],
|
'machineName' => $library['machineName'],
|
||||||
'majorVersion' => $library['major_version'],
|
'majorVersion' => $library['majorVersion'],
|
||||||
'minorVersion' => $library['minor_version'],
|
'minorVersion' => $library['minorVersion'],
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
$dynamicDependencies[] = array(
|
$dynamicDependencies[] = array(
|
||||||
'machineName' => $library['machine_name'],
|
'machineName' => $library['machineName'],
|
||||||
'majorVersion' => $library['major_version'],
|
'majorVersion' => $library['majorVersion'],
|
||||||
'minorVersion' => $library['minor_version'],
|
'minorVersion' => $library['minorVersion'],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Make embedTypes into an array
|
// Make embedTypes into an array
|
||||||
$embedTypes = explode(', ', $exports['embed_type']);
|
$embedTypes = explode(', ', $exports['embedType']);
|
||||||
|
|
||||||
// Build h5p.json
|
// Build h5p.json
|
||||||
$h5pJson = array (
|
$h5pJson = array (
|
||||||
|
|
Loading…
Reference in New Issue