|
|
|
@ -45,6 +45,7 @@ require_once $lib_path.'document.lib.php'; |
|
|
|
|
require_once $lib_path.'fileUpload.lib.php'; |
|
|
|
|
require_once $lib_path.'sortabletable.class.php'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
api_protect_course_script(true); |
|
|
|
|
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.js" type="text/javascript" language="javascript"></script>'; //jQuery |
|
|
|
|
$htmlHeadXtra[] = '<script type="text/javascript" src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/thickbox.js"></script>'; |
|
|
|
@ -220,13 +221,23 @@ if (!(DocumentManager::is_visible($curdirpath, $_course) || $is_allowed_to_edit) |
|
|
|
|
$course_quota = DocumentManager::get_course_quota(); |
|
|
|
|
$current_session_id = api_get_session_id(); |
|
|
|
|
|
|
|
|
|
/* Create the current user shared folder if no exist */ |
|
|
|
|
|
|
|
|
|
/* Create shared folder */ |
|
|
|
|
|
|
|
|
|
if (!file_exists($base_work_dir.'/shared_folder')) { |
|
|
|
|
$usf_dir_title = get_lang('SharedFolder'); |
|
|
|
|
$usf_dir_name = '/shared_folder'; |
|
|
|
|
$to_group_id = 0; |
|
|
|
|
$visibility = 0; |
|
|
|
|
create_unexisting_directory($_course, $_user['user_id'], $to_group_id, $to_user_id, $base_work_dir, $usf_dir_name, $usf_dir_title, $visibility); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (!file_exists($base_work_dir.'/shared_folder/sf_user_'.api_get_user_id())) { |
|
|
|
|
$usf_dir_title = api_get_person_name($_user['firstName'], $_user['lastName']); |
|
|
|
|
$usf_dir_name = '/shared_folder/sf_user_'.api_get_user_id(); |
|
|
|
|
$to_group_id = 0; |
|
|
|
|
create_unexisting_directory($_course, $_user['user_id'], $to_group_id, $to_user_id, $base_work_dir, $usf_dir_name, $usf_dir_title); |
|
|
|
|
$visibility = 0; |
|
|
|
|
create_unexisting_directory($_course, $_user['user_id'], $to_group_id, $to_user_id, $base_work_dir, $usf_dir_name, $usf_dir_title, $visibility); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* MAIN SECTION */ |
|
|
|
|