|
|
|
@ -65,23 +65,13 @@ switch ($action) { |
|
|
|
|
$results = array(); |
|
|
|
|
|
|
|
|
|
require_once api_get_path(LIBRARY_PATH).'course_category.lib.php'; |
|
|
|
|
$categories = browseCourseCategories(); |
|
|
|
|
|
|
|
|
|
foreach ($courseList as $courseInfo) { |
|
|
|
|
$title = $courseInfo['title']; |
|
|
|
|
|
|
|
|
|
if (!empty($courseInfo['category_code'])) { |
|
|
|
|
$parents = getParents($courseInfo['category_code']); |
|
|
|
|
|
|
|
|
|
if (!empty($parents)) { |
|
|
|
|
$parents = array_reverse($parents); |
|
|
|
|
$categories = array(); |
|
|
|
|
foreach ($parents as $category) { |
|
|
|
|
$categories[] = $category['code']; |
|
|
|
|
} |
|
|
|
|
$categoriesInString = implode(' > ', $categories).' > '; |
|
|
|
|
$title = $categoriesInString.$courseInfo['title']; |
|
|
|
|
} |
|
|
|
|
$parents = getParentsToString($courseInfo['category_code']); |
|
|
|
|
$title = $parents.$courseInfo['title']; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$results[] = array( |
|
|
|
|