Skip to content

Commit

Permalink
LP: Fix paths for chamilo_scorm_export inside index page - refs BT#18883
Browse files Browse the repository at this point in the history
  • Loading branch information
AngelFQC committed Jun 16, 2021
1 parent 1b6461a commit 5509ecd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main/lp/LpIndexGenerator.php
Expand Up @@ -108,7 +108,7 @@ private function generateToc()

if ($this->lp->ref === 'chamilo_scorm_export') {
$pathToRemove = 'scorm/'.$this->lp->path.'/';
$itemFilePath = str_replace($pathToRemove, '', $myFilePath);
$itemFilePath = 'document/'.str_replace($pathToRemove, '', $myFilePath);
}
}
} elseif (TOOL_LINK === $item->type) {
Expand Down Expand Up @@ -143,7 +143,7 @@ private function generateToc()
$ulNode->appendChild($liNode);
}

if (!empty($itemFilePath)) {
if (!empty($itemFilePath) && $itemFilePath !== 'document/') {
$aNode = $this->domDocument->createElement('a', $itemText);
$aNode->setAttribute('href', $itemFilePath);
$aNode->setAttribute('target', 'content-frame');
Expand Down

0 comments on commit 5509ecd

Please sign in to comment.