|
|
|
@ -424,8 +424,25 @@ function downloadMP3_google($filepath, $dir) |
|
|
|
|
$current_session_id = api_get_session_id(); |
|
|
|
|
$groupId = api_get_group_id(); |
|
|
|
|
$relativeUrlPath=$dir; |
|
|
|
|
$doc_id = add_document($_course, $relativeUrlPath.$audio_filename, 'file', filesize($documentPath), $audio_title); |
|
|
|
|
api_item_property_update($_course, TOOL_DOCUMENT, $doc_id, 'DocumentAdded', $_user['user_id'], $groupId, null, null, null, $current_session_id); |
|
|
|
|
$doc_id = add_document( |
|
|
|
|
$_course, |
|
|
|
|
$relativeUrlPath.$audio_filename, |
|
|
|
|
'file', |
|
|
|
|
filesize($documentPath), |
|
|
|
|
$audio_title |
|
|
|
|
); |
|
|
|
|
api_item_property_update( |
|
|
|
|
$_course, |
|
|
|
|
TOOL_DOCUMENT, |
|
|
|
|
$doc_id, |
|
|
|
|
'DocumentAdded', |
|
|
|
|
$_user['user_id'], |
|
|
|
|
$groupId, |
|
|
|
|
null, |
|
|
|
|
null, |
|
|
|
|
null, |
|
|
|
|
$current_session_id |
|
|
|
|
); |
|
|
|
|
Display::display_confirmation_message(get_lang('DocumentCreated')); |
|
|
|
|
//return to location |
|
|
|
|
echo '<script>window.location.href="'.$location.'"</script>'; |
|
|
|
|