|
|
|
@ -290,7 +290,7 @@ function FileUpload( $resourceType, $currentFolder, $sCommand ) |
|
|
|
|
|
|
|
|
|
if ($sErrorNumber == '0') |
|
|
|
|
{ |
|
|
|
|
// While we are in a course: Registering the newly created folder in the course's database. |
|
|
|
|
// While we are in a course: Registering the newly uploaded file in the course's database. |
|
|
|
|
if (api_is_in_course()) |
|
|
|
|
{ |
|
|
|
|
global $_course, $_user; |
|
|
|
@ -310,7 +310,7 @@ function FileUpload( $resourceType, $currentFolder, $sCommand ) |
|
|
|
|
$folder_path = '/' + implode('/', $path); |
|
|
|
|
$file_size = @filesize($sFilePath); |
|
|
|
|
$doc_id = add_document($_course, $file_path, 'file', $file_size, $file_name); |
|
|
|
|
api_item_property_update($_course, TOOL_DOCUMENT, $doc_id, 'FolderCreated', $_user['user_id'], $to_group_id); |
|
|
|
|
api_item_property_update($_course, TOOL_DOCUMENT, $doc_id, 'DocumentAdded', $_user['user_id'], $to_group_id); |
|
|
|
|
item_property_update_on_folder($_course, $folder_path, $_user['user_id']); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|