|
|
|
@ -878,9 +878,9 @@ if (isset($_GET['keyword']) && !empty($_GET['keyword'])) { |
|
|
|
|
} else { |
|
|
|
|
$docs_and_folders = DocumentManager::get_all_document_data($_course, $curdirpath, $to_group_id, null, $is_allowed_to_edit || $group_member_with_upload_rights, false); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (GroupManager::is_subscribed(api_get_user_id(), api_get_group_id()) || GroupManager :: is_tutor_of_group(api_get_user_id(), api_get_group_id()) || UserManager::is_admin(api_get_user_id())) { |
|
|
|
|
$folders = DocumentManager::get_all_document_folders($_course, $to_group_id, $is_allowed_to_edit || $group_member_with_upload_rights); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
if ($folders === false) { |
|
|
|
|
$folders = array(); |
|
|
|
|
} |
|
|
|
@ -1010,6 +1010,7 @@ $table_footer = ''; |
|
|
|
|
$total_size = 0; |
|
|
|
|
|
|
|
|
|
if (isset($docs_and_folders) && is_array($docs_and_folders)) { |
|
|
|
|
if (GroupManager::is_subscribed(api_get_user_id(), api_get_group_id()) || GroupManager :: is_tutor_of_group(api_get_user_id(), api_get_group_id()) || UserManager::is_admin(api_get_user_id())) { |
|
|
|
|
// Create a sortable table with our data |
|
|
|
|
$sortable_data = array(); |
|
|
|
|
|
|
|
|
@ -1102,6 +1103,7 @@ if (isset($docs_and_folders) && is_array($docs_and_folders)) { |
|
|
|
|
$sortable_data[] = $row; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
$sortable_data = ''; |
|
|
|
|
$table_footer = get_lang('NoDocsInFolder'); |
|
|
|
|