|
|
|
|
@ -2911,7 +2911,8 @@ class DocumentManager |
|
|
|
|
$index_document = false, |
|
|
|
|
$show_output = false, |
|
|
|
|
$fileKey = 'file', |
|
|
|
|
$treat_spaces_as_hyphens = true |
|
|
|
|
$treat_spaces_as_hyphens = true, |
|
|
|
|
$recordAudio = false |
|
|
|
|
) { |
|
|
|
|
$course_info = api_get_course_info(); |
|
|
|
|
$sessionId = api_get_session_id(); |
|
|
|
|
@ -2919,6 +2920,11 @@ class DocumentManager |
|
|
|
|
$sys_course_path = api_get_path(SYS_COURSE_PATH); |
|
|
|
|
$base_work_dir = $sys_course_path.$course_dir; |
|
|
|
|
|
|
|
|
|
if ($recordAudio) { |
|
|
|
|
$base_work_dir = $sys_course_path.$course_info['path'].'/exercises'; |
|
|
|
|
$path = str_replace('/../exercises/', '/', $path); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (isset($files[$fileKey])) { |
|
|
|
|
$uploadOk = process_uploaded_file($files[$fileKey], $show_output); |
|
|
|
|
if ($uploadOk) { |
|
|
|
|
|