|
|
|
@ -75,7 +75,6 @@ $message = null; |
|
|
|
|
<?php |
|
|
|
|
|
|
|
|
|
if (!isset($_GET['hidden_links']) || intval($_GET['hidden_links']) != 1) { |
|
|
|
|
|
|
|
|
|
$term = empty($_POST['search_term']) ? '' : api_htmlentities($searchTerm); |
|
|
|
|
$urlAction = CourseCategory::getCourseCategoryUrl(1, $pageLength, 'ALL', 0, 'subscribe'); |
|
|
|
|
$formSearch = new FormValidator('search_catalog', 'post', $urlAction, null, [], FormValidator::LAYOUT_BOX_SEARCH); |
|
|
|
@ -93,7 +92,6 @@ $message = null; |
|
|
|
|
$options = []; |
|
|
|
|
|
|
|
|
|
foreach ($browse_course_categories[0] as $category) { |
|
|
|
|
|
|
|
|
|
$categoryCode = $category['code']; |
|
|
|
|
$countCourse = $category['count_courses']; |
|
|
|
|
if (empty($countCourse)) { |
|
|
|
@ -101,7 +99,6 @@ $message = null; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$options[$categoryCode] = $category['name'].' ('.$countCourse.')'; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (empty($codeType)) { |
|
|
|
@ -111,8 +108,6 @@ $message = null; |
|
|
|
|
$select = $formSelect->returnForm(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($showCourses && $action != 'display_sessions') { |
|
|
|
|
if (!empty($message)) { |
|
|
|
|
$message = Display::return_message($message, 'confirmation', false); |
|
|
|
@ -143,7 +138,6 @@ if ($showCourses && $action != 'display_sessions') { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (!empty($browse_courses_in_category)) { |
|
|
|
|
|
|
|
|
|
foreach ($browse_courses_in_category as $course) { |
|
|
|
|
$course_hidden = $course['visibility'] == COURSE_VISIBILITY_HIDDEN; |
|
|
|
|
|
|
|
|
@ -167,7 +161,6 @@ if ($showCourses && $action != 'display_sessions') { |
|
|
|
|
|
|
|
|
|
// display the course bloc |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$course['category_title'] = ''; |
|
|
|
|
if (isset($course['category'])) { |
|
|
|
|
$course['category_title'] = isset($categoryList[$course['category']]) ? $categoryList[$course['category']] : ''; |
|
|
|
@ -261,11 +254,9 @@ if ($showCourses && $action != 'display_sessions') { |
|
|
|
|
'teachers' => $teachers, |
|
|
|
|
'ranking' => $rating, |
|
|
|
|
'description_ajax' => CourseManager::returnDescriptionButton($course), |
|
|
|
|
'subscribe' => $subscribeButton |
|
|
|
|
'subscribe' => $subscribeButton, |
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
if (!isset($_REQUEST['subscribe_user_with_password']) && |
|
|
|
|
!isset($_REQUEST['subscribe_course']) |
|
|
|
@ -278,7 +269,6 @@ if ($showCourses && $action != 'display_sessions') { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$template = new Template(get_lang('Course Catalog')); |
|
|
|
|
$template->assign('search', $search); |
|
|
|
|
$template->assign('select', $select); |
|
|
|
@ -290,10 +280,6 @@ $content = $template->fetch($layout); |
|
|
|
|
|
|
|
|
|
echo $content; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Display the goto course button of a course in the course catalog. |
|
|
|
|
* |
|
|
|
|