Category::getUrl(), 'name' => get_lang('ToolGradebook'), ]; } $interbreadcrumb[] = [ 'url' => 'lp_controller.php?action=list&'.api_get_cidreq(), 'name' => get_lang('LearningPaths'), ]; $interbreadcrumb[] = [ 'url' => api_get_self()."?action=build&lp_id=$learnpath_id&".api_get_cidreq(), 'name' => $lp->get_name(), ]; switch ($type) { case 'dir': $interbreadcrumb[] = [ 'url' => 'lp_controller.php?action=add_item&type=step&lp_id='.$lp->get_id().'&'.api_get_cidreq(), 'name' => get_lang('NewStep'), ]; $interbreadcrumb[] = ['url' => '#', 'name' => get_lang('NewChapter')]; break; case 'document': $interbreadcrumb[] = [ 'url' => 'lp_controller.php?action=add_item&type=step&lp_id='.$lp->get_id().'&'.api_get_cidreq(), 'name' => get_lang('NewStep'), ]; break; default: $interbreadcrumb[] = ['url' => '#', 'name' => get_lang('NewStep')]; break; } if ($action == 'add_item' && $type == 'document') { $interbreadcrumb[] = ['url' => '#', 'name' => get_lang('NewDocumentCreated')]; } // Theme calls. $show_learn_path = true; $lp_item_id = isset($_GET['id']) ? intval($_GET['id']) : null; if (empty($lp_item_id)) { api_not_allowed(); } $courseInfo = api_get_course_info(); $lp_item = new learnpathItem($lp_item_id); $form = new FormValidator( 'add_audio', 'post', api_get_self().'?action=add_audio&id='.$lp_item_id.'&'.api_get_cidreq().'&lp_id='.$learnpath_id, null, ['enctype' => 'multipart/form-data'] ); $suredel = trim(get_lang('AreYouSureToDeleteJS')); $lpPathInfo = $lp->generate_lp_folder(api_get_course_info()); DocumentManager::createDefaultAudioFolder($courseInfo); $audioFolderId = DocumentManager::get_document_id($courseInfo, '/audio'); $file = null; if (isset($lp_item->audio) && !empty($lp_item->audio)) { $file = api_get_path(SYS_COURSE_PATH).$courseInfo['path'].'/document/audio/'.$lp_item->audio; $urlFile = api_get_path(WEB_COURSE_PATH).$courseInfo['path'].'/document/audio/'.$lp_item->audio.'?'.api_get_cidreq(); if (!file_exists($file)) { $file = api_get_path(SYS_COURSE_PATH).$courseInfo['path'].'/document'.$lpPathInfo['dir'].'/'.$lp_item->audio; $urlFile = api_get_path(WEB_COURSE_PATH).$courseInfo['path'].'/document'.$lpPathInfo['dir'].'/'.$lp_item->audio.'?'.api_get_cidreq(); } } $page = $lp->build_action_menu(true); $page .= '
'; $page .= ''; $tpl->assign('content', $page); $tpl->display_one_col_template(); '; $recordVoiceForm = '