|
|
|
@ -15,16 +15,10 @@ if (isset($_REQUEST['action']) && Security::remove_XSS($_REQUEST['action']) !== |
|
|
|
|
|
|
|
|
|
$showCourses = CoursesAndSessionsCatalog::showCourses(); |
|
|
|
|
$showSessions = CoursesAndSessionsCatalog::showSessions(); |
|
|
|
|
$pageCurrent = isset($pageCurrent) ? $pageCurrent : |
|
|
|
|
isset($_GET['pageCurrent']) ? intval($_GET['pageCurrent']) : |
|
|
|
|
1; |
|
|
|
|
$pageLength = isset($pageLength) ? $pageLength : |
|
|
|
|
isset($_GET['pageLength']) ? intval($_GET['pageLength']) : |
|
|
|
|
10; |
|
|
|
|
$pageCurrent = isset($pageCurrent) ? $pageCurrent : isset($_GET['pageCurrent']) ? intval($_GET['pageCurrent']) : 1; |
|
|
|
|
$pageLength = isset($pageLength) ? $pageLength : isset($_GET['pageLength']) ? intval($_GET['pageLength']) : 12; |
|
|
|
|
$pageTotal = intval(ceil(intval($countCoursesInCategory) / $pageLength)); |
|
|
|
|
$cataloguePagination = $pageTotal > 1 ? |
|
|
|
|
CourseCategory::getCatalogPagination($pageCurrent, $pageLength, $pageTotal) : |
|
|
|
|
''; |
|
|
|
|
$cataloguePagination = $pageTotal > 1 ? CourseCategory::getCatalogPagination($pageCurrent, $pageLength, $pageTotal) : ''; |
|
|
|
|
$search_term = isset($search_term) ? $search_term : null; |
|
|
|
|
|
|
|
|
|
if ($showSessions && isset($_POST['date'])) { |
|
|
|
@ -144,7 +138,6 @@ $code = isset($code) ? $code : null; |
|
|
|
|
foreach ($browse_course_categories[0] as $category) { |
|
|
|
|
$categoryCode = $category['code']; |
|
|
|
|
$countCourse = $category['count_courses']; |
|
|
|
|
|
|
|
|
|
$form .= '<option '. ($categoryCode == $codeType? 'selected="selected" ':'') .' value="' . $category['code'] . '">' . $category['name'] . ' ( '. $countCourse .' ) </option>'; |
|
|
|
|
if (!empty($browse_course_categories[$categoryCode])) { |
|
|
|
|
foreach ($browse_course_categories[$categoryCode] as $subCategory){ |
|
|
|
@ -196,7 +189,7 @@ 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); |
|
|
|
|
$course_hidden = $course['visibility'] == COURSE_VISIBILITY_HIDDEN; |
|
|
|
|
|
|
|
|
|
if ($course_hidden) { |
|
|
|
|
continue; |
|
|
|
|