Skip to content

Commit

Permalink
Resolve DataCollection imports from ILIAS 8.12 and lower
Browse files Browse the repository at this point in the history
  • Loading branch information
iszmais committed Jul 4, 2024
1 parent 64600db commit 9e8c3e5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public function __construct()

public function getSupportedVersions(): array
{
return ['4.5.0'];
return ['4.5.0', '8.13'];
}

/**
Expand Down Expand Up @@ -459,6 +459,11 @@ public function importRecord(
$value = null;
}
break;
case ilDclDatatype::INPUTFORMAT_TEXT:
if (version_compare($a_schema_version, "8.13") < 0) {
$a_rec['value'] = str_replace('&lt;br /&gt;', '', $a_rec['value']);
}
// no break
default:
$value = $a_rec['value'];
if ($a_entity == 'il_dcl_stloc3_value' && empty($value)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
*
*********************************************************************/



declare(strict_types=1);

class ilDataCollectionExporter extends ilXmlExporter
Expand All @@ -44,8 +42,13 @@ public function getValidSchemaVersions(string $a_entity): array
'4.5.0' => [
'namespace' => 'https://www.ilias.de/Modules/DataCollection/dcl/4_5',
'xsd_file" => "ilias_dcl_4_5.xsd',
'uses_dataset' => true,
'min' => '4.5.0',
'max' => '8.12',
],
'8.13' => [
'namespace' => 'https://www.ilias.de/Modules/DataCollection/dcl/4_5',
'xsd_file" => "ilias_dcl_4_5.xsd',
'min' => '8.13',
'max' => '',
],
];
Expand Down

0 comments on commit 9e8c3e5

Please sign in to comment.