|
|
|
@ -140,7 +140,7 @@ $code = isset($code) ? $code : null; |
|
|
|
|
$form .= '<div class="form-group">'; |
|
|
|
|
$form .= '<div class="col-sm-12">'; |
|
|
|
|
$form .= '<select name="category_code" onchange="submit();" class="chzn-select form-control">'; |
|
|
|
|
$codeType = Security::remove_XSS($_REQUEST['category_code']); |
|
|
|
|
$codeType = isset($_REQUEST['category_code']) ? Security::remove_XSS($_REQUEST['category_code']) : ''; |
|
|
|
|
foreach ($browse_course_categories[0] as $category) { |
|
|
|
|
$categoryCode = $category['code']; |
|
|
|
|
$countCourse = $category['count_courses']; |
|
|
|
@ -155,24 +155,25 @@ $code = isset($code) ? $code : null; |
|
|
|
|
} |
|
|
|
|
$form .= '</select>'; |
|
|
|
|
$form .= '</div>'; |
|
|
|
|
$from .= '</form>'; |
|
|
|
|
$form .= '</form>'; |
|
|
|
|
echo $form; |
|
|
|
|
?> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<?php |
|
|
|
|
|
|
|
|
|
if ($showSessions) { ?> |
|
|
|
|
<div class="col-md-4"> |
|
|
|
|
<h5><?php echo get_lang('Sessions'); ?></h5>
|
|
|
|
|
<a class="btn btn-default btn-block" href="<?php echo getCourseCategoryUrl(1, $pageLength, null, 0, 'display_sessions'); ?>"><?php echo get_lang('SessionList'); ?></a>
|
|
|
|
|
<a class="btn btn-default btn-block" href="<?php echo getCourseCategoryUrl(1, $pageLength, null, 0, 'display_sessions'); ?>">
|
|
|
|
|
<?php echo get_lang('SessionList'); ?> |
|
|
|
|
</a> |
|
|
|
|
</div> |
|
|
|
|
<?php } ?> |
|
|
|
|
</div> |
|
|
|
|
<?php } ?> |
|
|
|
|
<div class="row"> |
|
|
|
|
<?php if ($showCourses && $action != 'display_sessions') {
|
|
|
|
|
|
|
|
|
|
<?php |
|
|
|
|
if ($showCourses && $action != 'display_sessions') { |
|
|
|
|
|
|
|
|
|
if (!empty($message)) { |
|
|
|
|
Display::display_confirmation_message($message, false); |
|
|
|
@ -271,8 +272,8 @@ $code = isset($code) ? $code : null; |
|
|
|
|
Display::display_warning_message(get_lang('ThereAreNoCoursesInThisCategory')); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
echo $cataloguePagination; |
|
|
|
|
} |
|
|
|
|
echo $cataloguePagination; |
|
|
|
|
|
|
|
|
|
?> |
|
|
|
|
</div> |
|
|
|
@ -308,6 +309,7 @@ function return_thumbnail($course, $icon_title) |
|
|
|
|
$html .= '<img class="img-responsive" src="'.$course_medium_image.'" alt="'.api_htmlentities($title).'"/>'; |
|
|
|
|
} |
|
|
|
|
$html .= '</div>'; // thumbail |
|
|
|
|
|
|
|
|
|
return $html; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -316,7 +318,8 @@ function return_thumbnail($course, $icon_title) |
|
|
|
|
* @param $course |
|
|
|
|
*/ |
|
|
|
|
function return_title($course) |
|
|
|
|
{ $html = ''; |
|
|
|
|
{ |
|
|
|
|
$html = ''; |
|
|
|
|
$linkCourse = api_get_course_url($course['code']); |
|
|
|
|
$title = cut($course['title'], 70); |
|
|
|
|
$ajax_url = api_get_path(WEB_AJAX_PATH).'course.ajax.php?a=add_course_vote'; |
|
|
|
@ -325,6 +328,7 @@ function return_title($course) |
|
|
|
|
$html .= '<h4 class="title"><a href="' . $linkCourse . '">' . cut($title, 60) . '</a></h4>'; |
|
|
|
|
$html .= '<div class="teachers">'.$teachers.'</div>'; |
|
|
|
|
$html .= '<div class="ranking">'. $rating . '</div>'; |
|
|
|
|
|
|
|
|
|
return $html; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -336,9 +340,11 @@ function return_title($course) |
|
|
|
|
function return_description_button($course, $icon_title) |
|
|
|
|
{ |
|
|
|
|
$title = $course['title']; |
|
|
|
|
$html = ''; |
|
|
|
|
if (api_get_setting('show_courses_descriptions_in_catalog') == 'true') { |
|
|
|
|
$html = '<a data-title="' . $title . '" class="ajax btn btn-default btn-sm btn-block" href="'.api_get_path(WEB_CODE_PATH).'inc/ajax/course_home.ajax.php?a=show_course_information&code='.$course['code'].'" title="'.$icon_title.'">'.get_lang('Description').'</a>'; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return $html; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -349,6 +355,7 @@ function return_description_button($course, $icon_title) |
|
|
|
|
function return_goto_button($course) |
|
|
|
|
{ |
|
|
|
|
$html = ' <a class="btn btn-primary" href="'.api_get_course_url($course['code']).'">'.get_lang('GoToCourse').'</a>'; |
|
|
|
|
|
|
|
|
|
return $html; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -363,6 +370,7 @@ function return_already_registered_label($in_status) |
|
|
|
|
$icon = Display::return_icon('user.png', get_lang('Student'), null, ICON_SIZE_TINY); |
|
|
|
|
} |
|
|
|
|
$html = Display::div($icon.' '.get_lang("AlreadyRegisteredToCourse"), array('id' => 'register', 'class' => 'user-register')); |
|
|
|
|
|
|
|
|
|
return $html; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -377,7 +385,6 @@ function return_register_button($course, $stok, $code, $search_term) |
|
|
|
|
{ |
|
|
|
|
$html = ' <a class="btn btn-success btn-block btn-sm" href="'.api_get_self().'?action=subscribe_course&sec_token='.$stok.'&subscribe_course='.$course['code'].'&search_term='.$search_term.'&category_code='.$code.'">'.get_lang('Subscribe').'</a>'; |
|
|
|
|
return $html; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -391,5 +398,4 @@ function return_unregister_button($course, $stok, $search_term, $code) |
|
|
|
|
{ |
|
|
|
|
$html = ' <a class="btn btn-primary" href="'. api_get_self().'?action=unsubscribe&sec_token='.$stok.'&unsubscribe='.$course['code'].'&search_term='.$search_term.'&category_code='.$code.'">'.get_lang('Unsubscribe').'</a>'; |
|
|
|
|
return $html; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|