Skip to content

Commit

Permalink
remove unallowed characters at import from ILIAS SCORM export files
Browse files Browse the repository at this point in the history
  • Loading branch information
Uwe-Kohnle committed Feb 13, 2024
1 parent cc7e1af commit 65715fe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public function startParsing()

public function getPackageTitle()
{
return $this->package_title;
return ilUtil::stripSlashes($this->package_title);
}

/*
Expand Down
4 changes: 1 addition & 3 deletions Modules/ScormAicc/classes/class.ilScormAiccImporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,11 @@ public function importXmlRepresentation($a_entity, $a_id, $a_import_dirname, $a_
foreach ($this->dataset->properties as $key => $value) {
$this->moduleProperties[$key] = $xmlRoot->$key;
}
$this->moduleProperties["Title"] = $xmlRoot->Title;
$this->moduleProperties["Description"] = $xmlRoot->Description;

foreach ($this->moduleProperties as $key => $xmlRoot) {
$xmlRootValue = $xmlRoot->__toString();
$filteredValue = preg_replace('%\s%', '', $xmlRootValue);
$this->moduleProperties[$key] = $filteredValue;
$this->moduleProperties[$key] = ilUtil::stripSlashes($filteredValue);
}

if ($a_id != null && $new_id = $a_mapping->getMapping('Services/Container', 'objs', $a_id)) {
Expand Down

0 comments on commit 65715fe

Please sign in to comment.