本文整理匯總了PHP中DocumentManager::is_any_user_shared_folder方法的典型用法代碼示例。如果您正苦於以下問題:PHP DocumentManager::is_any_user_shared_folder方法的具體用法?PHP DocumentManager::is_any_user_shared_folder怎麽用?PHP DocumentManager::is_any_user_shared_folder使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DocumentManager
的用法示例。
在下文中一共展示了DocumentManager::is_any_user_shared_folder方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: api_get_course_id
DocumentManager::file_send_for_download($full_file_name, true);
}
exit;
break;
case 'downloadfolder':
if (api_get_setting('students_download_folders') == 'true' || api_is_allowed_to_edit() || api_is_platform_admin()) {
// Get the document data from the ID
$document_data = DocumentManager::get_document_data_by_id($document_id, api_get_course_id(), false, $sessionId);
if ($sessionId != 0 && !$document_data) {
// If there is a session defined and asking for the
// document * from the session* didn't work, try it from the
// course (out of a session context)
$document_data = DocumentManager::get_document_data_by_id($document_id, api_get_course_id(), false, 0);
}
//filter when I am into shared folder, I can download only my shared folder
if (DocumentManager::is_any_user_shared_folder($document_data['path'], $sessionId)) {
if (DocumentManager::is_my_shared_folder(api_get_user_id(), $document_data['path'], $sessionId) || api_is_allowed_to_edit() || api_is_platform_admin()) {
require 'downloadfolder.inc.php';
}
} else {
require 'downloadfolder.inc.php';
}
// Launch event
Event::event_download($document_data['url']);
exit;
}
break;
case 'export_to_pdf':
if (api_get_setting('students_export2pdf') == 'true' || api_is_allowed_to_edit() || api_is_platform_admin()) {
DocumentManager::export_to_pdf($document_id, $course_code);
}