|
|
|
@ -84,6 +84,7 @@ class CourseCategory |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$sql = "SELECT |
|
|
|
|
t1.id, |
|
|
|
|
t1.name, |
|
|
|
|
t1.code, |
|
|
|
|
t1.parent_id, |
|
|
|
@ -483,6 +484,8 @@ class CourseCategory |
|
|
|
|
null, |
|
|
|
|
ICON_SIZE_SMALL |
|
|
|
|
); |
|
|
|
|
$exportIcon = Display::return_icon('export_csv.png', get_lang('ExportAsCSV'), ''); |
|
|
|
|
|
|
|
|
|
$deleteIcon = Display::return_icon( |
|
|
|
|
'delete.png', |
|
|
|
|
get_lang('DeleteNode'), |
|
|
|
@ -501,12 +504,18 @@ class CourseCategory |
|
|
|
|
$editUrl = $mainUrl.'&id='.$category['code'].'&action=edit'; |
|
|
|
|
$moveUrl = $mainUrl.'&id='.$category['code'].'&action=moveUp&tree_pos='.$category['tree_pos']; |
|
|
|
|
$deleteUrl = $mainUrl.'&id='.$category['code'].'&action=delete'; |
|
|
|
|
$exportUrl = $mainUrl.'&id='.$category['id'].'&action=export'; |
|
|
|
|
|
|
|
|
|
$actions = []; |
|
|
|
|
if ($urlId == $category['access_url_id']) { |
|
|
|
|
$actions[] = Display::url($editIcon, $editUrl); |
|
|
|
|
$actions[] = Display::url($moveIcon, $moveUrl); |
|
|
|
|
$actions[] = Display::url($deleteIcon, $deleteUrl); |
|
|
|
|
$actions[] = Display::url($exportIcon, $exportUrl); |
|
|
|
|
$actions[] = Display::url( |
|
|
|
|
$deleteIcon, |
|
|
|
|
$deleteUrl, |
|
|
|
|
['onclick' => 'javascript: if (!confirm(\''.addslashes(api_htmlentities(sprintf(get_lang('ConfirmYourChoice')), ENT_QUOTES)).'\')) return false;',] |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$url = api_get_path(WEB_CODE_PATH).'admin/course_category.php?category='.$category['code']; |
|
|
|
|