Skip to content

Commit

Permalink
Resolve DataCollection imports from ILIAS 8.12 and lower (ILIAS-eLear…
Browse files Browse the repository at this point in the history
  • Loading branch information
iszmais authored Jul 4, 2024
1 parent 6d361a2 commit 382124a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function __construct()

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

/**
Expand Down Expand Up @@ -444,6 +444,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
@@ -1,4 +1,5 @@
<?php

/**
* This file is part of ILIAS, a powerful learning management system
* published by ILIAS open source e-Learning e.V.
Expand All @@ -13,8 +14,7 @@
* https://www.ilias.de
* https://github.com/ILIAS-eLearning
*
********************************************************************
*/
*********************************************************************/

/**
* Class ilDataCollectionExporter
Expand Down Expand Up @@ -45,8 +45,13 @@ public function getValidSchemaVersions(string $a_entity): array
'4.5.0' => array(
'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' => array(
'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 382124a

Please sign in to comment.