|
|
|
|
@ -77,13 +77,16 @@ $sessionId = api_get_session_id(); |
|
|
|
|
$userId = api_get_user_id(); |
|
|
|
|
$_course = api_get_course_info(); |
|
|
|
|
$groupId = api_get_group_id(); |
|
|
|
|
$document_data = array(); |
|
|
|
|
|
|
|
|
|
$document_data = DocumentManager::get_document_data_by_id( |
|
|
|
|
$_REQUEST['id'], |
|
|
|
|
$courseCode, |
|
|
|
|
true, |
|
|
|
|
0 |
|
|
|
|
); |
|
|
|
|
if (isset($_REQUEST['id'])) { |
|
|
|
|
$document_data = DocumentManager::get_document_data_by_id( |
|
|
|
|
$_REQUEST['id'], |
|
|
|
|
$courseCode, |
|
|
|
|
true, |
|
|
|
|
0 |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (!empty($sessionId) && empty($document_data)) { |
|
|
|
|
$document_data = DocumentManager::get_document_data_by_id( |
|
|
|
|
@ -544,13 +547,21 @@ if ($form->validate()) { |
|
|
|
|
$array_len = count($dir_array); |
|
|
|
|
|
|
|
|
|
// Interbreadcrumb for the current directory root path |
|
|
|
|
if (empty($document_data['parents'])) { |
|
|
|
|
$interbreadcrumb[] = array('url' => '#', 'name' => $document_data['title']); |
|
|
|
|
} else { |
|
|
|
|
foreach($document_data['parents'] as $document_sub_data) { |
|
|
|
|
$interbreadcrumb[] = array('url' => $document_sub_data['document_url'], 'name' => $document_sub_data['title']); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (!empty($document_data)) { |
|
|
|
|
if (empty($document_data['parents'])) { |
|
|
|
|
$interbreadcrumb[] = array( |
|
|
|
|
'url' => '#', |
|
|
|
|
'name' => $document_data['title'] |
|
|
|
|
); |
|
|
|
|
} else { |
|
|
|
|
foreach ($document_data['parents'] as $document_sub_data) { |
|
|
|
|
$interbreadcrumb[] = array( |
|
|
|
|
'url' => $document_sub_data['document_url'], |
|
|
|
|
'name' => $document_sub_data['title'] |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Display :: display_header($nameTools, "Doc"); |
|
|
|
|
// actions |
|
|
|
|
|