LP: Fix paths for chamilo_scorm_export inside index page - refs BT#18883

pull/3889/head
Angel Fernando Quiroz Campos 4 years ago
parent 1b6461a651
commit 5509ecd620
  1. 4
      main/lp/LpIndexGenerator.php

@ -108,7 +108,7 @@ class LpIndexGenerator
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) {
@ -143,7 +143,7 @@ class LpIndexGenerator
$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');

Loading…
Cancel
Save