Merge branch 'release' into ignoreBuildFiles
commit
5ec651e696
|
@ -1676,7 +1676,7 @@ class H5PCore {
|
||||||
|
|
||||||
public static $coreApi = array(
|
public static $coreApi = array(
|
||||||
'majorVersion' => 1,
|
'majorVersion' => 1,
|
||||||
'minorVersion' => 10
|
'minorVersion' => 11
|
||||||
);
|
);
|
||||||
public static $styles = array(
|
public static $styles = array(
|
||||||
'styles/h5p.css',
|
'styles/h5p.css',
|
||||||
|
@ -3056,13 +3056,20 @@ class H5PContentValidator {
|
||||||
$function = null;
|
$function = null;
|
||||||
$field = null;
|
$field = null;
|
||||||
|
|
||||||
if (count($semantics->fields) == 1 && $flatten) {
|
$isSubContent = isset($semantics->isSubContent) && $semantics->isSubContent === TRUE;
|
||||||
|
|
||||||
|
if (count($semantics->fields) == 1 && $flatten && !$isSubContent) {
|
||||||
$field = $semantics->fields[0];
|
$field = $semantics->fields[0];
|
||||||
$function = $this->typeMap[$field->type];
|
$function = $this->typeMap[$field->type];
|
||||||
$this->$function($group, $field);
|
$this->$function($group, $field);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
foreach ($group as $key => &$value) {
|
foreach ($group as $key => &$value) {
|
||||||
|
// If subContentId is set, keep value
|
||||||
|
if($isSubContent && ($key == 'subContentId')){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// Find semantics for name=$key
|
// Find semantics for name=$key
|
||||||
$found = FALSE;
|
$found = FALSE;
|
||||||
foreach ($semantics->fields as $field) {
|
foreach ($semantics->fields as $field) {
|
||||||
|
|
|
@ -182,7 +182,7 @@ H5P.ContentUpgradeProcess = (function (Version) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'group':
|
case 'group':
|
||||||
if (field.fields.length === 1) {
|
if (field.fields.length === 1 && field.isSubContent !== true) {
|
||||||
// Single field to process, wrapper will be skipped
|
// Single field to process, wrapper will be skipped
|
||||||
self.processField(field.fields[0], params, function (err, upgradedParams) {
|
self.processField(field.fields[0], params, function (err, upgradedParams) {
|
||||||
if (upgradedParams) {
|
if (upgradedParams) {
|
||||||
|
|
Loading…
Reference in New Issue