示例#1
0
    }
    echo '<div class="actions">';
    echo Display::url(Display::return_icon('new_folder.png', get_lang('AddCategory'), array(), ICON_SIZE_MEDIUM), api_get_self() . '?' . api_get_cidreq() . '&action=add_lp_category');
    echo '<a href="' . api_get_self() . '?' . api_get_cidreq() . '&action=add_lp">' . Display::return_icon('new_learnpath.png', get_lang('LearnpathAddLearnpath'), '', ICON_SIZE_MEDIUM) . '</a>' . str_repeat('&nbsp;', 3) . '<a href="../upload/index.php?' . api_get_cidreq() . '&curdirpath=/&tool=' . TOOL_LEARNPATH . '">' . Display::return_icon('import_scorm.png', get_lang('UploadScorm'), '', ICON_SIZE_MEDIUM) . '</a>';
    if (api_get_setting('service_ppt2lp', 'active') == 'true') {
        echo str_repeat('&nbsp;', 3) . '<a href="../upload/upload_ppt.php?' . api_get_cidreq() . '&curdirpath=/&tool=' . TOOL_LEARNPATH . '">
		' . Display::return_icon('import_powerpoint.png', get_lang('PowerPointConvert'), '', ICON_SIZE_MEDIUM) . '</a>';
        //echo  str_repeat('&nbsp;', 3).'<a href="../upload/upload_word.php?'.api_get_cidreq().'&curdirpath=/&tool='.TOOL_LEARNPATH.'"><img src="../img/word.gif" border="0" alt="'.get_lang('WordConvert').'" align="absmiddle">&nbsp;'.get_lang('WordConvert').'</a>';
    }
    echo '</div>';
}
$token = Security::get_token();
/* DISPLAY SCORM LIST */
$categories_temp = learnpath::get_categories(api_get_course_int_id());
$category_test = new Entity\CLpCategory();
$category_test->setId(0);
$category_test->setName(get_lang('NoCategory'));
$category_test->setPosition(0);
$categories = array($category_test);
if (!empty($categories_temp)) {
    $categories = array_merge($categories, $categories_temp);
}
$test_mode = $app['debug'];
$lp_showed = false;
$total = count($categories);
$counterCategories = 1;
foreach ($categories as $item) {
    $list = new LearnpathList(api_get_user_id(), null, null, null, false, $item->getId());
    $flat_list = $list->get_flat_list();
    $edit_link = null;
    $delete_link = null;