Merge 1.9.x

1.10.x
Julio Montoya 11 years ago
commit 7dd9eaa235
  1. 10
      main/newscorm/learnpath.class.php

@ -9534,9 +9534,13 @@ EOD;
$item = $this->items[$item_id];
switch ($item->type) {
case 'document':
// Getting documents from a LP with chamilo documents
$fileData = DocumentManager::get_document_data_by_id($item->path, $this->cc);
$file_path = api_get_path(SYS_COURSE_PATH).$course_data['path'].'/document'.$fileData['path'];
//Getting documents from a LP with chamilo documents
$file_data = DocumentManager::get_document_data_by_id($item->path, $this->cc);
// Try loading document from the base course.
if (empty($file_data) && !empty($sessionId)) {
$file_data = DocumentManager::get_document_data_by_id($item->path, $this->cc, false, 0);
}
$file_path = api_get_path(SYS_COURSE_PATH).$course_data['path'].'/document'.$file_data['path'];
if (file_exists($file_path)) {
$files_to_export[] = array('title'=>$item->get_title(),'path'=>$file_path);
}

Loading…
Cancel
Save